%fputc() Function

The %fputc() function writes the character specified by character on the named output stream.

Syntax

var = %fputc(character, (char*)stream)

Description

NOTE

The character is passed as a number. Normal usage overrides the type (see the example below).

If successful, the character is returned as a number, otherwise eof (-1) is returned.

If the character is contained in a FlashBASIC dynamic array, an explicit (char) type override must be used, otherwise a pointer would be passed to the C function.

Example(s)

c=’a’

n=%fputc((char)c, (char*)strm)

See Also

%fclose() Function, %fopen() Function, %fprintf() Function, %fputs() Function, FlashBASIC C Functions Overview, cfunction Statement