Keyboard input/Obtain a Y or N response: Difference between revisions
Keyboard input/Obtain a Y or N response (view source)
Revision as of 08:17, 15 April 2020
, 4 years ago→{{header|QUACKASM}}
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
|||
Line 1,396:
#
wrapper(main)</lang>
=={{header|QB64}}==
''CBTJD'': 2020/03/15
<lang qbasic>WHILE INKEY$ <> "": WEND ' Flushes keyboard buffer.
PRINT "Do you want to continue? (Y/N)"
DO
k$ = UCASE$(INKEY$) ' Forces key response to upper case.
LOOP UNTIL k$ = "Y" OR k$ = "N"
PRINT "You pressed " + CHR$(34) + k$ + CHR$(34) + "." ' CHR$(34) prints quotation marks.</lang>
=={{header|QUACKASM}}==
|