Portability Function: Reads the next available character from external unit 5, which is normally connected to the console.
Module: USE DFPORT
Syntax
Results:
The result is of type INTEGER(4). The result is zero if successful, or -1 if an end-of-file was detected.
Compatibility
CONSOLE STANDARD GRAPHICS QUICKWIN GRAHICS WINDOWS DLL LIB
See Also: GETCHARQQ, GETSTRQQ, Programmer's Guide: Portability Library
Example
use dfport
character ans,errtxt*40
print *, 'Enter a character: '
ISTAT = GETC (ans)
if (istat) then
call gerror(errtxt)
end if