basic.%fputc C Function/BASIC Program

basic.%fputc

Command basic.%fputc C Function/BASIC Program
Applicable release versions: AP/Unix
Category BASIC Program (486)
Description writes the character specified by "character" on the named output "stream".

Note: The character is passed as a number. Normal usage would override the type (see example below). The Unix "putc()" and "putchar()" cannot be used because they are macros, rather than functions.

If successful, the character is returned as a number, else EOF (-1) is returned.

If the character is contained in a Pick/BASIC dynamic array, an explicit (char) type override must be used, otherwise a pointer would be passed to the C function.
Syntax variable=%fputc(character, (char*)stream)
Options
Example
c='a'
n=%fputc( (char)c, (char*)strm )
Purpose
Related basic.cfunc
basic.cfunction
basic.%fopen
basic.%fclose
basic.%fprintf
basic.%fputs