RosettaCodeData/Task/User-input-Graphical/PowerBASIC/user-input-graphical.powerbasic

15 lines
414 B
Text
Raw Permalink Normal View History

2013-04-11 01:07:29 -07:00
FUNCTION PBMAIN () AS LONG
result$ = INPUTBOX$("Enter a string.")
MSGBOX result$
DO
'This assumes that 75000 is the ONLY valid input.
result$ = INPUTBOX$("Enter the number 75000.")
IF VAL(result$) <> 75000 THEN
MSGBOX "You need to enter 75000!"
ELSE
MSGBOX "You entered the right number."
EXIT DO
END IF
LOOP
END FUNCTION