put_char/1/2

outputs a single character to a stream.

put_char(+Char)
put_char(+Stream, +Char)

put_char/1 outputs a single character to the current outputstream.

put_char/2 outputs a single character to the stream named in the first argument.

Arguments

Stream                 output text stream
Char                   character

Examples

Assume the content of a stream S is abcdefg and the stream position is behind the last character.

put_char(S, h). Succeeds. The content of stream S is now abcdefgh.

Standard

These predicates are part of the ISO-Prolog Standard.

See also

get_char/1/2, get_code/1/2, peek_char/1/2, peek_code/1/2, put_code/1/2, nl/0/1, current_output/1, set_output/1.


Up read on...