EasyManua.ls Logo

Radio Shack TRS-80 Model 3 - Numeric Operators

Radio Shack TRS-80 Model 3
276 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...
Operators fall into four categories:
Numeric
String
Relational
Logical
based
on
the kinds
of
operands they require and the results they produce.
Numeric Operators
Numeric Operators are used in numeric expressions. Theiroperands must always
be numeric, and the resultthey produce is one numeric data item.
In the descriptions below, we use the terms integer, single-precision, and
double-precisionoperations. Integer operations involve two-byte operands,
single-precision operations involve four-byte operands, and double-precision
operations involve eight-byte operands. The more bytes involved, the slower the
operation.
There are five differentnumeric operators.
Two
of
them, sign + and sign , are
unary, that is, they have only one operand. A sign operator has no effect on the
precision
of
its operand.
Forexample, in the statement:
PRINT
-77,
+77
the sign operators - and
+ produce the values negative
77
and positive
77
,
respectively.
Note:
When
no sign operatorappears in front
of
a numeric term, +
is
assumed.
Theother numeric operators are all binary, that is, they all take two operands.
These operators are:
+
*
/
[ or
CD
Addition
Subtraction
Multiplication
Division
Exponentiation. Press the
CD
key to type
in
this operator.
1/19

Related product manuals