|
DATA
Abbreviation: D <SHIFT+A>
TYPE: Statement
FORMAT: DATA <list of constants>
Action: DATA statements store information within a program.
The program uses the information by means of the READ statement,
which pulls successive constants from the DATA statements.
The DATA statements don't have to be executed by the program,
they only have to be present. Therefore, they are usually placed
at the end of the program.
All data statements in a program are treated as a continuous
list. Data is READ from left to right, from the lowest numbered
line to the highest. If the READ statement encounters data that
doesn't fit the type requested (if it needs a number and finds
a string) an error message occurs.
Any characters can be included as data, but if certain ones
are used the data item must be enclosed by quote marks ("
"). These include punctuation like comma (,), colon (:),
blank spaces, and shifted letters, graphics, and cursor control
characters.
EXAMPLES of DATA Statement:
10 DATA 1,10,5,8
20 DATA JOHN,PAUL,GEORGE,RINGO
30 DATA "DEAR MARY, HOW ARE YOU, LOVE, BILL"
40 DATA -1.7E-9, 3.33
|