basic.%fgetc C Function/BASIC Program

basic.%fgetc

Command basic.%fgetc C Function/BASIC Program
Applicable release versions: AP/Unix
Category BASIC Program (486)
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.
Syntax variable=%fgetc( (char*)stream )
Options
Example
c=(char)%fgetc( (char*)strm )
crt c

Note the character type casting to override the default (int) type.
Purpose
Related basic.cfunc
basic.cfunction
basic.%fopen
basic.%fclose
basic.%fgets
basic.%fputs