Radio Shack TRS-80 Model 100 Basic Manual page 78

Basic language lab
Hide thumbs Also See for TRS-80 Model 100:
Table of Contents

Advertisement

After this is done, you will be back in BASIC with the updated program. List it to
verify that it is:
10 INPUT "NAME"; N$
20
READ AS, AG
30
IF AS
< >
NS THEN GOTO
20
l10
PRINT "AGE IS", AG
50
DATA DAN,
32,
RON,
38,
LINDA,
l12
80
DATA BETTY,
35,
RALPH,
2S,
SKIP,
3
Note that line 40 contains the correct variable AG. Execute the program. Here is an
example of the output:
NAME? LINDA
AGE IS
42
Ok
II
Run the program several times entering different names to verify that it is executing
correctly.
Experiment #2 Inserting a Word
Lines 10 and 40 of the previous program will be changed to
10
INPUT "YOUR NAME"; NS
l10
PRINT "YOUR AGE IS"; AG
The word YOUR must be inserted in both lines as shown above. This will be done
using the Editor.
Type the command
ED I T
(ENTER)
to enter the Edit Mode.
72

Advertisement

Table of Contents
loading

Table of Contents