LINE INPUT #1 Reads Up to 32,767 Characters into String (63621)



The information in this article applies to:

  • Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0

This article was previously published under Q63621

SUMMARY

Page 182 of "Microsoft QuickBASIC for Apple Macintosh: Language Reference" incorrectly states that 1023 is the maximum number of characters that can be read by the LINE INPUT # statement. LINE INPUT # can actually read up to 32,767 characters (the maximum string length).

MORE INFORMATION

The maximum number of characters for LINE INPUT # in Microsoft Basic Compiler version 1.0 for Macintosh was 1023. This limit was increased to 32,767 with Microsoft QuickBasic 1.0 for the Macintosh.

If more than 32,767 characters are on a line read with LINE INPUT #, the characters from 32,768 to the end of the line are lost.

Note: The LINE INPUT # statement treats a carriage return character (ASCII byte value 13) as the end of an input line.

"The Waite Group's Microsoft QuickBASIC Bible" (published by Microsoft Press, 1990) also incorrectly states on page 599 that QuickBasic for the Macintosh has a limit of 1023 characters in a LINE INPUT # statement. The limit is 32767 characters.

Modification Type:MinorLast Reviewed:1/9/2003
Keywords:KB63621