%FGETC

%FGETC


%FDOPEN Index Level %FGETS
Syntax variable = %FGETC( (char*)stream )
Category BASIC
Type C Function
Description returns the next character from the named input "stream".

Note that the character is returned as a number. Normal usage would override the type (see example below).  The Unix "getc()" and "getchar()" cannot be used because they are macros, rather than functions.
Options
See Also c function CFUNCTION %FOPEN %FCLOSE %FGETS %FPUTS
Example c=(char)%fgetc( (char*)strm )
crt c

Note the character type casting to override the default (int) type.
Warnings
Compatibility D3/Unix
%FDOPEN Index Level %FGETS