Apple ii Battery Charger User Manual


 
ADDITIONAL STRING CONSIDERATIONS
1. A string may contain from 0 to 255 characters. All string variable names end in a dollar
sign ($); for example, A$, B9$, K$, HELLO$.
2. String matrices may be dimensioned exactly like numeric matrices. For instance,
DIM A$(10,10) creates a string matrix of 121 elements, eleven rows by elevon columns
(rows 0 to 10 and columns 0 to 10). Each string matrix element is a complete string,
which can be up to 255 characters in length.
NAME EXAMPLE PURPOSE/USE
---- ------- -----------
DIM 25 DIM A$(10,10) Allocates space for a pointer and length for
each element of a string matrix. No string
space is allocated.
LET 27 LET A$="FOO"+V$ Assigns the value of a string expression to
a string variable. LET is optional.
= String comparison operators. Comparison
> is made on the basis of ASCII codes, a
< character at a time until a difference is
<= or =< found. If during the comparison of two
>= or => strings, the end of one is reached, the
<> shorter string is considered smaller.
Note that "A " is greater than "A" since
trailing spaces are significant.
+ 30 LET Z$=R$+Q$ String concatenation. The resulting string
must be less than 256 characters in length
or an LS error will occur.
INPUT 40 INPUT X$ Reads a string from the keyboard. String
does not have to be quoted; but if not,
leading blanks will be ignored and the
string will be terminated on a "," or ":"
character.
READ 50 READ X$ Reads a string from DATA statements
within the program. Strings do not have
to be quoted; but if they are not, they
are terminated on a "," or ":" character
and leading spaces are ignored. See
DATA for the format of string data.
PRINT 60 PRINT X$ Prints the string expression on the
70 PRINT "FOO"+A$ display/printer.
300 STATEMENT DEFINITIONS
301 SPECIAL CHARACTERS
CHARACTER USE
--------- ---
@ Erases current line being typed, and types a carriage return/line
feed.
DEL Erases last character typed. If no more characters are left on
the line, types a carriage return/line feed.
RETURN A RETURN must end every line typed in. Returns cursor to
the first position (leftmost) on line, and prints the line if the
printer is on.
F1 Interrupts execution of a program or a list command. F1 has
effect when a statement finishes execution, or in the case of
interrupting a LIST command, when a complete line has
finished printing. In both cases a return is made to BASIC's