Table of Contents

Advertisement

6-2 Program Commands
Example:
10 INPUT A
20 ON A GOSUB 100,200,300
30 GOTO 10
100 PR INT "SUB 100" : RETURN
200 PRINT ''SUB 200'' :RETURN
300 PRINT "SUB 300" :RETURN
*When
1
~
3 is entered,
a
branching to the
corresponding subroutine occurs.
DATA
Function:
Stores data.
Parameter:
Data:
Explanation:
[data]
[, [data]]
*
Constant Constant
Character constant or
numeric
constant.
1) Used to write data that
is
read by a READ statement.
2) Plural data can be written by punctuation with ", ".
®
3) If only a DATA
statement
is executed without a READ
statement, no
func-
tion is performed.
4) When a character constant
includes",",
place
it
inside"
"
DATA ABC,
DEF,
"GHI,
JKL", ......
1st
2nd
3rd
5) When data is omitted, a character string with a
length
of 0
is
taken by default.
DATA A, ,B
DATA,
DATA
~
DATA A,''",B
~
DATA
"","''
- i - -
Null string
~DATA""
__J
6) Even if a command
is
added to a DAT A statement with a colon (: )
,
it will
be
regarded as data and will
not
be executed.
DAT A
1
2 , 3 4 ,
5
6 : INPUT A
(regarded as
data)
123

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents