EasyManuals Logo
Home>IBM>Laptop>5100

IBM 5100 Basic Reference Manual

IBM 5100
187 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 #55 background imageLoading...
Page #55 background image
(
(
(
(
(
(
EXPRESSIONS
An expression
in
BASIC
is
any representation
of
an arithmetic
or
character value.
Constants, variables, arrays, array element references, and function references are
all
considered expressions. Expressions can also be formed by combining any
of
these
value representations with symbols called operators.
An operator specifies either
the
relationship between data items, an arithmetic oper-
ation
to
be performed
on
them,
or
whether they are positive or negative. For
example, the symbols
>,
*,
and + are operators specifying greater
than,
multiplication,
and addition (or positive value), respectively.
A special class
of
expressions, called relational expressions,
is
used with
the
I F state-
ment
to
test the
truth
of specified relationships between
two
values.
Expressions referring
to
entire arrays, rather than individual array elements, are
called array expressions. An expression
that
does not contain a reference
to
an
entire array
is
called a scalar expression.
Arithmetic Expressions and Operators
An arithmetic expression can be an arithmetic variable, array element, constant, or
function reference;
or
it can be a series
of
the
preceding items separated by operators
and parentheses. Some examples
of
arithmetic expressions are:
A1
X3/
(-6)
X+Y+Z
SIN(R)
-6.4
-(X-Xt2/
2+
X)
The value
of
an arithmetic expression
is
obtained by performing
the
implied oper-
ations on
the
specified data items.
The five arithmetic operators are:
Symbol Meaning
tor
**
Exponentiation
* Multiplication
/
Division
+
Addition
Subtraction
Note
that
the system stores * *
as
t.
51

Table of Contents

Other manuals for IBM 5100

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM 5100 and is the answer not in the manual?

IBM 5100 Specifications

General IconGeneral
BrandIBM
Model5100
CategoryLaptop
LanguageEnglish

Related product manuals