In my "more" replacement program implemented in Rexx,
I'd love to act on user commands based on a single
keystroke (e.g., pressing "f" or "b" moves forward or
backward one screen, respectively). I'm unable to
figure out how to do this and as a consequence all user
commands must be terminated by a carriage return
(<CR>). I tried the following:
l=charout(stdout,"Enter a command: "
userinput = charin(stdin,,1)
but its behavior is not as I expected: it still
requires <CR>, and it then reads both the command and
<CR> as separate entities.
Variations on the charin statement do not seem to help.