EasyManua.ls Logo

Radio Shack TRS-80 Model III - Page 124

Radio Shack TRS-80 Model III
274 pages
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
Addition
The
+
operator is the
symbol for addition. The addition
is done with
the precision
of
the more precise operand
(the less precise
operand is converted).
For example,
when one operand is
integer
type
and the other
is single-precision
, the
integer is
converted
to single-precision and
four-byte addition is
done
.
When one
operand
is single-precision
and the other is
double-precision, the
single-precision
number
is converted
to double-precision and
eight-byte addition is
done
.
Examples:
PRINT 2
+ 3
Integer addition.
PRINT
3.1+3
Single-precision
addition.
PRINT
1.2345678901234567
+ 1
Double-precision
addition.
Subtraction
The
operator is
the symbol
for
subtraction. As with addition,
the operation
is
done with the
precision
of the more
precise operand (the
less precise
operand is
converted)
.
Examples:
PRINT
33-11
Integer
subtraction.
PRINT 33-11.1
Single-precision
subtraction.
PRINT
12.345678901234567
-
1
1
Double-precision
subtraction.
114

Other manuals for Radio Shack TRS-80 Model III

Related product manuals