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 #83 background imageLoading...
Page #83 background image
(
(
(
Notes
About
IF
The expressions being compared within
the
relational expressions must contain
data of
the
same
type
(character
or
arithmetic).
THEN and GOTO are interchangeable in
the
I F statement. Either can be used,
but
not
both. GOTO
is
stored by
the
system.
Comparison for equal must compare exactly
to
13
digits.
Example
The following examples show a variety
of
IF
statements:
30
IF
A(3)
=1=
X+2/Z GOTO
85
40
IF
R$ = 'CAT' GOTO
70
50
IF
S2 =
37.222
GOTO
120
60
IF
X>Y
GOTO
90
70
IF
A>BI
C>O
GOTO
110
80
IF
A$ =
'JOB'
& B$ = 'OATE' GOTO
100
In
statement 40, for example, if character variable R$ contains
the
word CAT, pro·
gram control
is
passed
to
statement 70.
In
statement
70, if either
A>
B
or
C>
0,
control passes
to
statement
110.
79

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