User`s manual

A-9
Statement/Function Examples Page
LET
variable=expression
Assign value of expression to
variable. LET is optional in
LEVEL II BASIC.
LET A$="CHARLIE"
LET B1=C1
LET A%=I#
4/5
(Sequence of Execution)
END
End execution, return to
Command Mode.
99 END
4/6
STOP
Stop execution, print Break
message with current line
number. User may continue with
CONT.
100 STOP
4/6
GOTO
line-number
Branch to specified line-number.
GOTO 100
4/7
GOSUB
line-number
Branch to sub-routine beginning
at line-number.
GOSUB 3000
4/7
RETURN
Branch to statement following
last-executed GOSUB.
RETURN
4/8
ON
exp
GOTO
line#1, …,line#k
Evaluate expression; if INT (
exp
)
equals one of the numbers 1
through
k
, branch to the
appropriate line number.
Otherwise go to next statement.
ON K+1 GOTO 100,200,300
4/8
ON
exp
GOSUB
line#1, …,line#k
Same as ON … GOTO except
branch is sub-routine beginning
at
line#1, line#2
, …, or
line#k
,
depending on exp.
ON J GOSUB 330,700
4/9
FOR
var
=
exp
TO
exp
STEP
exp
Open a FOR-NEXT loop. STEP
is optional; if not used,
increment of one is used.
FOR I=1 TO 50 STEP 1.5
FOR M%=J% TO K%-1
4/10-12