Radio Shack TRS-80 PC-3 Owner's Manual page 146

Table of Contents

Advertisement

1 LET variable
=
expression
2 variable
=
expression
Abbreviations: LE.
Purpose
The LET verb is used to assign a value to a variable.
Use
The LET verb assigns the value of the expression to the designated variable. The type of the expression must match that of the
variable, i.e., only numeric expressions can be assigned to numeric variables and only string expressions can be assigned to string
variables. In order to convert from one type to the other, one of the explicit type conversion functions, STR$ or VAL, must be
used.
The LET verb may be omitted in all LET statements except those which appear in the THEN clause of an IF .. , THEN state-
ment. In this one case, the LET verb must be used.
Examples
10
1=10
20 A
=
5*1
30 X$ = STR$ (A)
40 IFI> 10 THEN LET Y$ = X$+".00"
Assigns the value 10 to I.
Assigns the value 50 to A.
Assigns the value '50' to X$.
Assigns the value '50.00' to Y$.
146

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents