Keyboard input/Obtain a Y or N response: Difference between revisions

no edit summary
No edit summary
Line 275:
<pre>Enter Y or N: abcN
Response: N</pre>
 
 
=={{header|ERRE}}==
<lang ERRE>
!$KEY
................
! flush the keyboard buffer
REPEAT
GET(K$)
UNTIL K$=""
 
PRINT("Press Y or N to continue")
GET(K$)
UNTIL INSTR("YyNn",K$)<>0
 
PRINT("The response was ";K$)
.................
</lang>
<code>!$KEY </code> is a directive pragma: using it <code>GET</code> became an equivalent to Qbasic INKEY$, otherwise it's equivalent to QBasic INPUT$(1). !$KEY is also used to mantain portability with the C-64 version of ERRE language.
 
=={{header|Euphoria}}==
Anonymous user