Delay Loops
Erase all the PRINT statements so that absolutely nothing is in the
FOR-NEXT sandwich loop, except the FOR and the NEXT statements.
Run the program and see what happens:
15
16
17
18
19
20
21
22
23
LIST
R U N
Nothing happens. Change the number in line 10 and watch carefully
again:
10 FOR JKL=1 TO 500
RUN
The Ready prompt takes a few seconds to appear. Change line 10
again:
10 FOR JKL = 1 TO 5000
RUN
This time the Ready prompt takes considerably longer to appear. The
computer is counting but not printing its calculations. The process is
similar to counting silently to yourself. The time it takes the Ready
prompt to appear on the screen is the time it takes the computer to
count to 5000.
FOR-NEXT loops are excellent devices for keeping the computer from
moving on. In fact, FOR-NEXT loops are used so frequently for this
purpose that they are sometimes called "delay loops," and the
common variable name is DELAY. Rewrite the FOR-NEXT loop, using
DELAY as the variable name and different numbers in the FOR
statement:
NEW
10 FOR DELAY=1 TO 300
20 NEXT D E L A Y
LIST
R U N
61
Содержание 65XE
Страница 1: ...ATARI 65XE PERSONAL COMPUTER OWNER S MANUAL TM...
Страница 3: ...ATARI 65XE PERSONAL COMPUTER TM...
Страница 6: ...Part 1 GettingStarted 1...
Страница 9: ...4...
Страница 23: ...18...
Страница 25: ...20...
Страница 32: ...Part 2 Programming withATARI BASIC 27...
Страница 33: ...28...
Страница 59: ...54...
Страница 69: ...64...
Страница 82: ...Part3 Appendices 77...
Страница 83: ...78...
Страница 97: ...92...
Страница 105: ...100...
Страница 125: ...120...
Страница 126: ...121 Index...
Страница 127: ...122...
Страница 134: ...ATARI 1987 Atari Corp All Rights Reserved Printed in Taiwan C072018 001 REV B K l 2 1987...
Страница 135: ......