6-2
Program Commands
Example:
10
N=12
20
PRINT
CSR
N;
"@'';
30
K$=KEY$
40
IF
K$=''4''THEN
N=N-1:
IF
N<0
THEN
N=0
50
IF
K$=''6''THEN
N=N+1:
IF
N)23
THEN
N=23
60
PRINT
70
GOTO
20
*"
@"
is
shifted to the left when the
[g)
key
is
pressed and
is
shifted to the
right when the
(§]
is
pressed.
F
QR
Control variable name =
Initi~I
value . T Q
Fi~al
value
.®
Numenc
express10n Numenc express10n
(S
TE
p Increment ) N
EXT
Control variable name
Numeric expression
Function:
Repeats process contained between
FOR
and NEXT statements a number
of
times specified by the control variable. The value
of
this variable
is
changed,
from the initial
to
the final one,
by
the increment for each repetition
of
the
process.
Parameter:
Control variable name:
Initial value:
Final value:
Increment:
Simple numeric type variable name.
An array variable cannot be used.
Numeric expression
Numeric expression
Numeric expression
The value
1
is
taken in default
of
this.
119