EasyManua.ls Logo

Texas Instruments TI-99/4A - Relational Expressions

Texas Instruments TI-99/4A
204 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...
Relational
Expressions
Not equal to (< > )
Less
than
or
equal
to «
=)
Greater
than
or
equal to
(>
=)
Relational
expressions
are
normally used in the
IF-THEN·ELSE
statement
but
may
be used
anywhere
numeric,
expressions
are
allowed. When you
use
relational
expressions
within a
numeric
expression, a
numeric
value
of
-1
is given if
the
relation is
true
and
a
numeric
value of 0 is
g-iven
if
the relation is false.
Relational operations
are
performed from left to right before
string
concatenation
and
after
all
arithmetic
operations
within
the
expression
are
completed. To
pertorm
string
concatenation
before
relational
operations
and/or
to perform relational
operations
before
arithmetic
operations, you
must
use
parentheses.
Valid relational
operators
are:
Equal to
(=)
Less
than
«)
Greater
than
( »
An
explanation
of
how
string
comparisons
are
performed
to give
you a
true
or false
result
IS
discussed
In
the
IF-THEN-ELSE
explanation.
Remember
that
the result you
obtain
from the
evaluation
of
a relational
operator
is always a number.
If
you try
to use the result
a5
a string. you will
get
an
error.
II·14
Examples:
>NEW
>100
A=2<5
>-110
0-3<;-2
>120 PRINT A;8
>130
END
>RlJN
-1
0
**
DONE
**
>NEW
>100
A$="Hl"
>110
8$-"
THERE!"
>120
PRINT
(A$&B$)="HI!"
>130
END
>RUN
o
**
DONE
**
>120 PRINT (A$&B$)
>"HI"
>RUN
-1
**
DONE
**
>120
PRINT
(A$>BS)*4
>~IJN
-4
**
DONE
**
>NEW
>100 A=2<4*3
>110
B=A=O
>120 PRINT
AiB
>130
END
>RUN
-1
0
**
DONE
**
User's
Reference
Guide

Other manuals for Texas Instruments TI-99/4A

Related product manuals