basic.%fputc
Puts a character on a stream.
Syntax
variable=%fputc(character, (char*)stream)
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.
Example
c='a'
n=%fputc( (char)c, (char*)strm )
See Also
User Comments
What do you think?
Share your experience or ask a question by using the form below.
Login to leave your comments.
