Anonymous user
Keyboard input/Keypress check: Difference between revisions
no edit summary
No edit summary |
|||
Line 48:
==={{header|Applesoft BASIC}}===
<lang ApplesoftBasic>K = PEEK(-16384) : IF K > 127 THEN POKE -16368,0 : K$ = CHR$(K)</lang>
==={{header|IS-BASIC}}===
<lang IS-BASIC>100 LET K$=INKEY$</lang>
or
<lang IS-BASIC>100 GET K$</lang>
==={{header|ZX Spectrum Basic}}===
Line 55 ⟶ 62:
20 LET k$ = INKEY$</lang>
==={{header|BBC BASIC}}===
<lang bbcbasic> key$ = INKEY$(0)</lang>
If there was no keypress an empty string is returned. Alternatively a numeric key-code may be obtained; if there was no keypress -1 is returned:
|