Read And Data - Radio Shack TRS-80 Preliminary User's Manual

Micro computer system
Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

READ and DATA

Up to now we've looked at two ways to enter numbers into a
program. One is by assigning a value to a letter (A = 5).
Another is with the INPUT statement. Another method is with
DATA.
Try this :
10 DATA 1,2,3,4,5
20 READ A,B,C,D,E
30 PRINT A ;B ;C ; D ;E
RUN this program.
NOTE: DATA statements can have values assigned with commas
separating them; same with READ statements.
DATA lines are always read from left to right by READ statements.
It does not matter where DATA statements come in the sequence of
a program. Move line 10 to line 25. Move it to line 10000. Works
the same in any case.
TAB Function
The TAB function is just like the Tab on a typewriter. It tells
the Computer to start printing at a specified number of spaces
in from the left. Try this:
10 PRINT T A B (12)," @ @ @ @ "
20 PRINT T A B (32),"####"
RUN it.
@@@@
P. 16

Advertisement

Table of Contents
loading

This manual is also suitable for:

26-100126-120114-841

Table of Contents