TRS-80 MODEL III
DEFINT letter range
Variables beginning with any letterin the specified range will be stored and treated
as integers, unless a type declaration characteris added to the variable name. This
lets you conserve memory, since integer values take up less memory than other
numeric types. And integer arithmetic is faster than single
or
double precision
arithmetic. However, a variable defined as integer can only take on values between
32768 and
+32767 inclusive.
Examples:
10
DEFINTA,
I,
N
Afterline 10, all variables beginning with A,
lor
N will be treated as integers. For
example,
AI,
AA,
13
and
NN
will be integer variables. However,
Al
# ,AA# ,
13
#
would still be double precision variables, because
of
the type declaration
characters, which always over-ride
DEF
statements.
10
DEFINT
I-N
Causes variables beginning with I, J,
K,
L,
M
or
N to be treated as integer
variables.
DEFINT
may be placed anywhere in a program, butit may change the meaning
of
variable references without type declaration characters. Therefore it is normally
placed at the beginning
of
a program.
See
DEFSNG,
DEFDBL,
and Chapter
1.
DEFSNG letter range
Causes any variable beginning with a letterin the specifiedrange to be stored and
treated as single precision, unless a type declaration characteris added. Single
precision variables
an~
constants are stored with 7 digits
of
precision and printed
out with 6 digits
of
precision. Since all numeric variables are assumed to be single
precisionunless DEFined otherwise, the
DEFSNG
statement is primarily used to
re-define variables which have previously been defined as double precision or
integer.
Example:
100 DEFSNG
I,
w-z
Causes variables beginning with the letter
lor
any letterW through Z to be treated
as single precision. However,
1%
would still bean integer variable, and
1#
a double
precisionvariable, due to the use
of
type declaration characters.
See
DEFINT,
DEFDBL,
and Chapter
1.
4/2