#include "cobscreen.h" int cobgetch (void);
None.
Reads a character from the keyboard and returns it. If no character is pending this routine waits until a key is pressed.
A value of -1 is returned on error (for example, EOF).
call "CBL_READ_KBD_CHAR" using ...
The following code asks for a Yes/No response:
int ch; cobaddstrc("Continue [y/n]? "); ch = cobgetch(); if (ch == 'Y' || ch == 'y') { /* Yes */
Comments:
Reads a character from the keyboard and returns it. If no character is pending this routine waits until a key is pressed.
A value of -1 is returned on error (for example, EOF).