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 #58 background imageLoading...
Page #58 background image
54
The following examples illustrate the successive steps
in
the
evaluation of four arith-
metic expressions according
to
the rules just described.
In
each expression,
the
vari-
ables A,
B,
and C have been assigned the integer values 4, 6, and 2, respectively.
Expression
-At2+B/C*2.5
(-At2)+B/C*2.5
-At(2+B/C)*2.5
-At((2+B)/C)*2.5
Character Expressions
Evaluation and Result .
-4t2+6/2*2.5
- 16 +6/2*2.5
-16
+6/2*2.5
-16
+3
*2.5
-16
+ 7.5
-8.5
(-4t2)+6/2 *2.5
- 16 +6/2*2.5
-16
+6/2*2.5
-16
+3 *2.5
-16
+ 7.5
-8.5
-4t(2+6/2)*2.5
-4t(2+3) *2.5
-4t5
*2.5
- 1024 *2.5
-1024 *2.5
-2560
-4t((2+6)/2)*2.5
-4t
(8/2) *2.5
-4t4
*2.5
- 256 *2.5
-256 *2.5
-640
A character expression
is
a character constant, a character variable, a single element
of
a character array,
or
a substring (STR) function. The only operators ever asso-
ciated with character expressions are the relational operators described next. The
following are examples
of
valid character expressions:
D$(4)
A$
STR(A$,1,3)=B$
(
'\
, i
~

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