
49
Example:
RANDOM 5649
Remarks:
The value of <exp> should be from -32768 to 32767. If the expression is omitted,
a message requesting the random number seed will be displayed.
If the random number generator is not reseeded, the RND function returns the
same sequence of random numbers each time the program is run. To change
the sequence of random numbers each time the program is RUN, place a RAN-
DOM statement at the beginning of the program and change the seed with each
RUN.
For more information, refer to the explanation of RND.
READ Statement
Purpose:
To read values from a DATA statement and assign them to the
specified variables
Format:
READ <list of var>
Example:
READ A,B$
Remarks:
A read statement must always be used in conjunction with a DATA statement.
READ statements assign variables to DATA statement values on a one-to-one
basis. READ statement variables may be numeric or string, and the values read
must be the same type as the corresponding variable. If they do not agree, a syn-
tax error will occur.
A single READ statement may access one or more DATA statements (they will
be accessed in order), or several READ statements may access the same DATA
statement.
If the number of variables in <list of var> exceeds the number of elements in the
DATA statement(s), an error message will be displayed. If the number of vari-
ables specified is fewer than the number of elements in the DATA statement(s),
subsequent READ statements will begin reading data at the first unread ele-
ment. If there are no subsequent READ statements, the extra data is ignored.
To reread DATA statements from the beginning, use the RESTORE statement.
REM Statement
Purpose:
To insert non-executable comments in a program
Format:
REM <remark>
<remark> text does not need to be enclosed in quotes.
Example:
REM SAMPLE PROGRAM
Remarks:
The REM statement is used to provide titles to programs and to insert helpful
comments to be used during program debugging or modification.
Remarks may be added to the end of a line by preceding the remark with a single
quotation mark instead of REM.
Do not use a REM statement in a DATA statement as it will be taken as legal
data.
RESTORE Statement
Purpose:
To allow DATA statements to be reread from a specified line
Format:
RESTORE [<line>]
<line> should be the line number of a valid DATA statement.
Example:
RESTORE 1000
Commands, Statements, and Functions
Содержание C500-ASC04
Страница 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Страница 5: ...iv ...
Страница 7: ...vi ...