Example 3 - Using Variables In Programming - Radio Shack TRS-80 PC-3 Owner's Manual

Table of Contents

Advertisement

Input
INS
Type in the
!.
The display looks like this:
Input
Display
10: PRINT "GOODBYE."
Display
10: PRINT "GOODBYE!II
inL~
Remember to press
(ENTER)
so the correction will be entered into the program.
NOTE:
If you wish to DELete an entire line from your program, just type in the line number and the original line will be elimi-
nated.
Example 3 - Using Variables in Programming
If you are unfamiliar with the use of numeric and string variables in BASIC, reread these sections in Chapter 4.
Using variables in programming allows much more sophisticated use of the PC-3's computing abilities.
Remember, you assign simple numeric variables using any letter from A to Z.
A
=
5
To assign string variables, you also use a letter following by a dollar sign.
Do not use the
same
letter in designating a numeric and
66

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents