Keyboard input/Obtain a Y or N response: Difference between revisions
Content added Content deleted
No edit summary |
m (→{{header|REXX}}: minor comment change. -- ~~~~) |
||
Line 363: | Line 363: | ||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
REXX (in general) requires the user to press ENTER when |
REXX (in general) requires the user to press ENTER when entering text. |
||
entering text. |
|||
<br><br> |
<br><br> |
||
Some REXX interpretors have a keyboard read subroutine so that the |
Some REXX interpretors have a keyboard read subroutine so that the |
||
program can read keyboard keys as they are pressed. |
program can read keyboard keys as they are pressed. |
||
<lang rexx>/*REXX program to test for Y or N key when pressed.*/ |
|||
<lang rexx> |
|||
do queued() /*flush the stack if any lines queued. */ |
do queued() /*flush the stack if any lines queued. */ |
||
pull |
pull |
||
Line 385: | Line 384: | ||
end |
end |
||
/*as this point, ANS holds a Y or N. */ |
/*as this point, ANS holds a Y or N. */</lang> |
||
</lang> |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |