EasyManua.ls Logo

Radio Shack TRS-80 Model 4 - Page 169

Radio Shack TRS-80 Model 4
418 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...
If
either operand is double precision, then both are converted to
double precision and eight-byte division is performed.
If
neither operand
is
double precision, then both are converted to
single precision and four-byte division
is
performed.
Examples:
PRINT
3/4
single-precision division
is
performed.
PRINT
3.8/4
single-precision division
is
performed.
PRINT
3/1.2345678901234567
double-precision division is performed.
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 performed. 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
performed.
Examples:
PRINT 2 + 3
integer addition
is
performed.
PRINT
3.1
+ 3
single-precision addition
is
performed.
PRINT
1.2345678901234567
+ 1
double-precision addition
is
performed.
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
is
performed.
2-41

Other manuals for Radio Shack TRS-80 Model 4

Related product manuals