EasyManua.ls Logo

Texas Instruments TI-99/4A - Numeric 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...
Numeric
Expressions
Numeric
expressions
are
constructed
from numeric variables.
numeric
con..<;tants.
and
function references using
arithmetic
operators
(+
-
*/
1\). All functions referenced in
an
expression
must
be
either
functions supplied in
TI
BASIC (see sections
on
Built-In
Fllnr:tion!'\)
or
rlf':fi.nf~rl
hya
DEF
!'\tatement.
The
two
kinds
of
arithmetic
operators
(prefix
and
infix)
are
discussed below.
The
prefix
arithmetic
operators
are
plus (
+)
and
minus
(
-)
and
are
used to indicate the
sign
(positive
or
negative) of
constants
and
variables.
The
plus
sign
indicates
the
number
following the prefix
operator
(+)
should
be multiplied by + 1,
and
the minus
sign
indicates the
number
following the prefix
operator
(
-)
should be
multiplied by
-1.
Note
that
if no prefix
operator
is
present,
the
number
is
treated
as
if
the
prefix
operator
were
plus.
Some
examples
of prefix
operators
with
constants
and
variables are:
10
-6
+3
+A -W
The
infix
arithmetic
operators
are
used for calculations
and
include:
addition (
+),
subtraction
(-),
multiplication
(*)!
division (I),
and
exponentiation (1\). An infix
operator
must
appear
between
each
numeric
constant
and/or
variable in a
numeric
expression.
Note
that
multiplication
cannot
be implied by simply placing variables
side
by
side
or
by
using
parentheses.
You
must
use the
multiplication
operator
(*).
Infix.
and
prefix
operators
may
be
entered
side by side within a
numeric expression.
The
operators
are
evaluated
in
the
normal
way.
11-12
Examples:
>NEIi
>100 A=6
>110 8=4
>120 C=20
>130
D=2
>140
PRINT A*B/2
>150 PRINT C-D*3+6
>160
END
>RUN
12
20
**
DONE
**
>PRINT 3+
-1
2
>PR1NT
2*-3
-6
>PR1NT
6/-3
-2
User's Reference Guide

Other manuals for Texas Instruments TI-99/4A

Related product manuals