PutCode2
Implements ISO's put_code/2: writes the character coded by the integer second argument to the output stream identified by the first (an alias or $stream(...) term).
Throws
if either argument is unbound.
if the first argument does not identify an open channel.
(stream_type) if it identifies an input channel instead.
(character_code) if the second argument is bound but not an integer.
(character_code) if it is an integer outside the representable character-code range.
Fails, rather than erroring, if the channel is closed.