11 - 94 11 - 94
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Program Example
10 ' Waits for the input from the keyboard
20 PRINT "Yes or No ?";
30 A$=INPUT$(1)
:
' Enters one character from the keyboard
40 IF A$="Y" OR A$="y" THEN PRINT:PRINT "OK!!":GOTO 60
50 PRINT:PRINT "???"
60 END
RUN
Yes or No ?
OK!!
OK
RUN
Yes or No ?
???
OK
REMARK
See the INPUT and LINE INPUT instructions, and Section 3.11