RosettaCodeData/Task/User-input-Text/OPL/user-input-text.opl

30 lines
599 B
Text
Raw Permalink Normal View History

2026-02-01 16:33:20 -08:00
PROC main:
LOCAL s$(15),l&
WHILE s$=""
2025-06-11 20:16:52 -04:00
PRINT "Please enter a string."
2026-02-01 16:33:20 -08:00
INPUT s$
IF s$=""
2025-06-11 20:16:52 -04:00
PRINT "Nothing was entered. Please try again."
PAUSE 60
CLS
ENDIF
ENDWH
2026-02-01 16:33:20 -08:00
PRINT "Thank you! Yoe entered: ";s$
WHILE l&<>75000
2025-06-11 20:16:52 -04:00
PRINT "Please enter the number 75000."
2026-02-01 16:33:20 -08:00
TRAP INPUT l&
2025-06-11 20:16:52 -04:00
IF ERR=-1
PRINT
PRINT "That's not a valid number. Please try again."
PAUSE 60
CLS
2026-02-01 16:33:20 -08:00
ELSEIF l&<>75000
2025-06-11 20:16:52 -04:00
PRINT "Wrong number. Please try again."
PAUSE 60
CLS
ENDIF
ENDWH
2026-02-01 16:33:20 -08:00
PRINT "Good job! You succesfully entered 75000!"
2025-06-11 20:16:52 -04:00
GET
ENDP