home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Falcon 030 Power 2
/
F030_POWER2.iso
/
ST_STE
/
MAGS
/
ICTARI03.ARJ
/
ictari.03
/
GFA
/
TUTORIAL
/
FORNXT_4.LST
< prev
next >
Wrap
File List
|
1989-07-29
|
801b
|
28 lines
' *** ***
' *** Demo Of Use Of EXIT IF... In Loop ***
' *** ***
' *** Good programmers will avoid this, ***
' *** REPEAT_2.LST shows a better way ***
' *** of achieving the same effect ***
' *** ***
'
key%=120 !*** 120 Is ASCII Of 'x' ***
PRINT "Press '";CHR$(key%);"' to exit program"
PRINT
'
FOR attempt%=5 DOWNTO 1
PRINT attempt%;" attempt(s) left:"
test%=INP(2)
EXIT IF test%=key% !*** Exit If Pressed 'x' ***
NEXT attempt% !*** Exit If No Attempts Left ***
'
IF attempt%=0
PRINT CHR$(10);"YOU FAILED!"
ELSE
PRINT CHR$(10);"YOU PASSED!"
ENDIF
'
PRINT CHR$(7);
VOID INP(2)
EDIT