EasyManua.ls Logo

Commodore 128 - Page 303

Commodore 128
448 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
NOTE: All positions up to the one(s) to be changed must be
specified.
For example PUDEF $ would print the $ in place of the dollar
sign but the decimal point, comma and filler character would all
be set to a space.
PUDEF only affects numeric formats i.e. PUDEF0 will change
filler spaces in numbers to leading Os, but will not affect filler
spaces in strings.
The character to replace the $ has no effect unless the $ is
preceded by a # (i.e. is floating).
READ
Read data from DATA statements and input it into the
computer’s memory (while the program is RUNning)
READ variable list
This statement takes information from DATA statements and
stores them in variables, where the data can be used by the
RUNning program. The READ statement variable list may contain
both strings and numbers. Be careful to avoid reading strings
where the READ statement expects a number, this produces a
TYPE MISMATCH ERROR message.
The data in the DATA statements are READ in sequential order.
Each READ statement can read one or more data items. Every
variable in the READ statement requires a data item. If one is not
supplied, an OUT OF DATA ERROR occurs.
ln a program, you can READ the data and then reREAD by
issuing the RESTORE statement. The RESTORE sets the
sequential data pointer back to the beginning, where the data can
be READ again. See the RESTORE statement.
EXAMPLES:
10 READ A, B, C
20 DATA 3, 4, 5
READ 3 data items (which must be numeric or an error will
occur) into variables A, B, and C.
17-61

Table of Contents

Other manuals for Commodore 128

Related product manuals