350
The
VIC
20
User
Guide
If
an unconditional branch
is
one of many statements following THEN,
the branch must be the last statement on the line, and it must have "GOTO
line" format.
If
the unconditional branch
is
not the last statement on the line,
then statements following the unconditional branch can never
be
executed.
The following statements cannot appear in an immediate mode IF-
THEN statement: DATA, GET, GET#, INPUT, INPUT#, REM, RETURN,
END, STOP, WAIT.
If
a line number
is
specified, or any statement containing a line number,
there must
be
a corresponding statement with that line number in the
current stored program.
The CO NT and DATA statements cannot appear in a program mode
IF-THEN statement.
If
a FOR-NEXT loop follows the THEN, the loop
must be completely contained on the IF-THEN line. Additional IF-THEN
statements may appear following the THEN as long
as
they are completely
contained on the original IF-THEN line. However, Boolean connectors are
preferred to nested IF-THEN statements.
For
example, the two statements
below are equivalent, but the second
is
preferred.
18
IF
AS="X"
THEN
IF
'1112
THEN
IF
C)D
THEN
50
10
IF
AS="X"
AND
)1"2
AND
C)D
THEN
50
Example:
4ee
IF
X>Y
THEN
A=l
500
IF
M+l
THEN
AO=4.5
GOSUB
1000
INITIAUZE
You can use PRINT# to initialize a diskette before performing any
operation on it.
Format:
PRINT#file, "[INITIALIZE][ dr]"
The diskette in drive dr
is
initialized.
If
the dr parameter
is
not present,
the diskette in drive 0 will
be
initialized. You do not need to initialize a
diskette after preparing it; the preparation process also initializes the
diskette.
Example:
OPEN
1.8,15
Open the diskette
command
channel