User Tools

Site Tools


jvs:cigal:manual:chapter3:getchar

CIGAL Reference Manual, Chapter 3 (Functions): GETCHAR

GETCHAR -- Read one character from the keyboard

usage: val = getchar(noecho,nowait)

GETCHAR reads one character from the keyboard. The returned value is the read character. The flag arguments NOECHO and NOWAIT control how GETCHAR is called, as follows:

    If NOECHO == 0, the character is echoed on the screen as it is read
    If NOWAIT == 0, the function waits until a character has been typed
    If NOWAIT != 0, the function returns immediately; if no character was
                    read, the return value is 0
 
    Both NOECHO and NOWAIT default to 0.

NOTE: The internal variable, KEYRD can also be used to read a keyboard character. Each time you read the KEYRD variable it returns the next typed character. KEYRD behaves as a variable, rather than a function and can be used more easily than GETCHAR. For most purposes, KEYRD is equivalent to GETCHAR(0,0).

See Also:
GETTXT(3), GETXYZ(3), KEYRD(4), WAIT(2)

CIGAL Home, CIGAL Manual, Functions List, Manual Help

jvs/cigal/manual/chapter3/getchar.txt · Last modified: 2023/02/23 18:43 (external edit)