EasyManua.ls Logo

Tandy 1000 - Numeric Variables; Operators; Arithmetic Operators

Default Icon
337 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...
Basic
E
declares a single precision exponential number. For exam-
ple, the number 1.2E5 is stored as 120000.
declares a double precision number. However, single preci-
sion constants are not expanded by BASIC. For example,
the number 1.5# is stored as 1.5 even though
it
is treated
as a double precision number.
D declares the number a double precision exponential number.
For example, the number 1.2D2 is stored as 120.
#
Numeric Variables
BASIC classifies all numeric variables as single precision. You can
change this classification by appending one of the following symbols
to the variable name:
YO
declares an integer variable. Examples are
I%,
FT%,
COUNTER%.
!
declares a single precision variable. Examples are
F!,
NM!,
BALANCE!.
#
declares a double precision variable. Examples are
S#,
AD#,
TOTAL#.
The inclusion of one of these symbols creates a new and distinct
variable name. For example, A%, A!, and A# can each represent a
separate value.
Operators
An operator is a symbol or word that signifies an action to be per-
formed on the associated data. Data items are called operands. The
4
types
of
operators are: arithmetic, string, relational, and logical.
Arithmetic Operators
A
Exponentiation. Calculates the power
of
a number. For ex-
ample, 2”3
is
8
(2 to the power
of
3
is the same as 2*2*2).
Negation or Unary Minus. Makes a number negative. For
example, -10
is
“negative ten.”
Multiplication, Division. For example,
3*3
is
9,
and 10/5 is 2.
-
*
,
/
Tandy
1000
11

Table of Contents

Other manuals for Tandy 1000

Related product manuals