EasyManua.ls Logo

Radio Shack TRS-80 Model III - Page 116

Radio Shack TRS-80 Model III
274 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
TRS-80 MODEL
Type
Declaration
Tags
You can override
BASIC'S normal
typing criteria
by adding the following
'
'tags" to
the
end of the numeric
constant:
! Makes the number
single-precision
. For example
, in the
statement:
A= 12.345678901234!
the
constant is
classified as
single-precision, and
shortened
to seven digits:
12.34567
E
Single-precision
exponential
format. The
E indicates the
constant is
to be
multipled
by a specified
power of
10. For example:
A
=
1.2E5
stores the single-precision
number 120000 in A.
#
Makes
the number
double-precision.
For example, in
statement:
PRINT
3#/7
the first
constant
is classified
as double-precision
before the
division takes
place.
D
Double-precision
exponential format.
The D indicates
the constant
is to
be
multipled
by a specified
power of
10. For example:
A=1.23456789D-1
The
double-precision
constant has the value
0. 123456789.
How
BASIC
Classifies
Variables
When
BASIC encounters
a variable name in the program, it classifies it as either a
string, integer,
single-
or double-precision number.
BASIC
classifies all
variable
names as
single-precision
initially.
For
example:
AB
AMOUNT
XY
L
are all single-precision
initially.
If this
is the first line of
your program:
LP
=
1.2
BASIC
will classify
LP as
a single-precision
variable.
106

Other manuals for Radio Shack TRS-80 Model III

Related product manuals