EasyManua.ls Logo

Radio Shack TRS-80 Model 4 - Page 168

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...
*,
/
+ -
,
For example,
in
the statement:
PRINT
-77,
+77
the sign operators - and + produce the values negative 77 and
positive
77,
respectively.
NOTE: When no sign operator appears
in
front of a numeric term, +
is assumed.
The other numeric operators are
all
binary, that
is,
they all take two
operands.
These operators are,
in
order of precedence:
Exponentiation
Multiplication, Division
Addition, Subtraction
Exponentiation
The symbol
'"
denotes exponentiation.
It
converts both its operands
to single precision and returns a single-precision result.
NOTE: To enter
the'"
operator, press
(CLEAR)(D.
For example:
PRINT
6~.3
prints 6 to the
.3
power.
Multiplication
The * operator is the symbol for multiplication. Once again, BASIC
uses the precision of the more precise operand to perform the
operation (the less precise operand
is
converted).
Examples:
PRINT
33 *
11'X.
integer mUltiplication is performed.
PRINT
33 *
11.1
single-precision multiplication is performed.
PRINT
12.3a567880123a567
*
11
double-precision multiplication is performed.
Division
The / symbol
is
used
to
indicate ordinary division. Both operands are
converted to single precision or double precision, depending on their
original precision:
2-40

Other manuals for Radio Shack TRS-80 Model 4

Related product manuals