EasyManuals Logo

Tandy 1000 Basic Reference Manual

Default Icon
411 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
Page #57 background imageLoading...
Page #57 background image
Chapter
51
Basic
Concepts
Normally, logical operators are used in IFiTHEN statements.
For
ex ample
:
IF
A
=
1
OR
C
=
2
THEN PRINT
X
BASIC prints the variable X
if
1
or
both
of
the relational expres-
sions are true. If both are false, BASIC does not print the vari-
able
x.
IF
S$
=
"TEXAS" CIND
C$
=
"AUSTIN" THEN PRINT
Z$
BASIC prints the value
of
Z$
if
S$
contains the word TEXAS
and
C$ contains the word AUSTIN.
You may also use logical operators
to
make bit comparisons
of
2
numeric expressions. In this case, BASIC does a bit-by-bit com-
parison
of
the
2
values, according
to
predefined rules for the spe-
cific operator. Note that the operands are converted
to
integer
type, stored internally as 16-bit, two's complement numbers.
This information
is
important when doing bit comparisons.
Hierarchy
of
Operators
BASIC uses a predefined hierarchy when performing operations
on expressions with multiple operators. This list shows the oper-
ators in the order that BASIC would perform the operations in a
statement. Remember, BASIC evaluates statements from left
to
right. Operators with the same level
of
hierarchy are shown on
the same line.
A
unary
-
*/
\
MOD
+-
<
>
=
<=
>=
<>
NOT
AND
OR, XOR
IMP
Consider this expression:
X
*
X
+
5^2.8
EQV
55

Table of Contents

Other manuals for Tandy 1000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tandy 1000 and is the answer not in the manual?

Tandy 1000 Specifications

General IconGeneral
ProcessorIntel 8088
Processor Speed4.77 MHz
RAM128 KB (expandable to 640 KB)
Operating SystemMS-DOS 2.11
ManufacturerTandy Corporation
Release Year1984
StorageSingle or double 5.25" floppy disk drive (360 KB), optional hard drive
SoundTandy 3-voice sound
PortsParallel, Serial
GraphicsCGA (Color Graphics Adapter)
Graphics Modes320x200, 640x200

Related product manuals