Alternate Entry Name: PUT.CH
B: char = putchar( char ); char = putc( unit, char );
/* C users use C "putchar", "fputc", etc. */
PUTCHAR writes its argument out to the current write unit and returns its argument to the caller. Except for Media-4 files, PUTCHAR does nothing with a word containing only a '*0', so you can say something like
while( putchar( getchar() ) );
For a Media-4 file, the '*0' will be written to the file. The current write unit must be open as a character stream output unit; otherwise, the output vanishes.
With PUTC, you must specify a unit. PUTC returns the character it wrote out.
Copyright © 1996, Thinkage Ltd.