User`s manual
1-5
The same variable name may be used for different variable types, and the
Computer will still keep them distinct,
because of the type declaration
character:
For example, A$, A%, A!, A# are distinct variable names.
Variables without declaration characters are assumed to be single-precision;
this assumption can be changed with DEFine statements (Chapter 4).
Arrays
Any valid variable name can be used to name an array in LEVEL II BASIC;
and arrays are not limited to one dimension. The DIMension statement is
used to define arrays at the beginning of a program. Depending on the
variable type used, an array may contain strings, integers, double precision
values, etc. A whole chapter of this Manual is devoted to arrays:
Examples: A$(X,Y,Z) would be a three-dimensional array
containing string values
G3(I,J) would be a two-dimensional array containing
numerical single-precision values
G#(I) would be a one dimensional array of double
precision values.
Arithmetic Operators
LEVEL II uses the same arithmetic operators as LEVEL I: + (addition),
-(subtraction), * (multiplication) and / (division).
And there's a new, very handy operator:
↑
(exponentiation: 2
↑
3 = 8).
The
↑
operation is generally accurate to 6 significant digits. For example, to
compute 6*2
1/3
:
PRINT 6*2
↑
↑↑
↑
(1/3)
NOTE: Some TRS-80's generate a [ character instead of the
↑
arrow.










