HP 9000 200 Series Manual page 142

Using the basic 5.0/5.1 system
Table of Contents

Advertisement

Here is another example of indenting the same program, but with different parameters:
INDENT 5.4
10 FOR 1=1 TO 5
20
REPEAT
30
INPUT "How old are you?".Age
40
Reasonable=l
! Assume they're telling the truth ...
50
IF Age<O THEN
60
DISP "A negative age implies you are not born."
70
Reasonable=O
80
ELSE
90
IF Age>120 THEN
100
DISP "Are you sure?!"
110
Reasonable=O
120
ELSE
130
IF Age>100 THEN
140
DISP "You are pretty spry!"
150
ELSE
IF Age>80 THEN
160
170
DISP "Wow! Most people your age don't use computers
much."
180
ELSE
190
DISP "Glad to meet you.
II
200
END IF
210
END IF
220
END IF
230
END IF
240
WAIT 4
250
UNTIL Reasonable
260
DISP "You were"; Age*365. 2422;" days old on your last birthday.
II
270
WAIT 3
280 NEXT I
290 END
Editing and Storing Programs
6-21

Advertisement

Table of Contents
loading

This manual is also suitable for:

9000 300 series

Table of Contents