Chapter
10
I
BASIC
Ke-ywords
The data item ends when BASIC encounters
a
terminating char-
acter
or
when a terminating condition occurs. The terminating
characters vary, depending on whether BASIC is inputting
to
a
numeric or a string variable:
Numeric:
BASIC ends input when it encounters a carriage
return
or
a comma.
String:
BASIC ends input when it encounters
a
carriage re-
turn or
a
comma, unless the first character is
a
quotation
mark(
"
).
If the first character is a quotation mark, BASIC
ends input when
it
encounters
a
second quotation mark.
Thus, a quoted string may not contain a quotation mark
as
a character.
Examples
INPUT#l,
A,B
sequentially inputs
2
numeric data items from the file opened to
Buffer
1
and places them in
A
and B.
INPUT#4,
A$,
E$,
C$
sequentially inputs
3
string data items from the file opened to
Buffer
4
and places them in A$, B$, and C$.
182