EasyManuals Logo

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 #88 background imageLoading...
Page #88 background image
84
Notes
About
LET
Data values
to
the
right
of
the
equal sign must be
of
the
same
type
(arithmetic
or character) as
the
variables
to
which they are assigned.
The keyword LET
is
optional.
Hexadecimal constants can also be assigned
to
character variables
in
LET state·
ments. The constant must begin with X' followed by an even number
of
char·
acters
0
to
9 and A
to
F. The end
of
the constant must be indicated by a single
quotation mark (').
Subscripted references
to
array elements are permitted
in
the assignment
statement.
The maximum number
of
variables
to
the left
of
the
equal sign
in
a multiple
assignment statement
is
limited only by the line size (64 characters).
Example
Some sample LET statements are as shown:
10 LET
Z$
= 'CAT'
20
LET X = 9
30
LET
V(X) = 2
40
V(X), X =
XIV
(X)
50
LET A$ = X'0201130903'
After execution
of
statement 10,
the
character variable Z$ will contain
the
word
CAT followed by
15
blank characters.
After execution
of
statement 30,
the
ninth member of the one·dimensional arith·
metic array
(V)
will have
the
integer value 2.
After execution
of
statement 40,
the
arithmetic variable X
will
have
the
decimal
value 4.5. The ninth member
of
the
one·dimensional arithmetic array V will have
the
decimal value 4.5. The action
of
statement
40
is
to
first evaluate
the
expression
on
the
right according
to
the
current values
of
the variables V(X) and
X,
2, and 9,
respectively. The resulting value, 4.5,
is
first assigned
to
V(9), then
to
the
variable
X.
After execution
of
statement 50,
the
variable A$ will contain the hexadecimal con·
stant listed (see Appendix E for hexadecimal representations).
/~
/

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
Release Year1975
RAM16 KB - 64 KB
Storage204 KB tape drive
Display5-inch CRT
Operating SystemAPL/BASIC
ProcessorIBM PALM (1.9 MHz)

Related product manuals