Documentation Prolog Predicate Reference builtin put_byte/2

put_byte/2

Write byte in output stream.

Description

put_byte( +stream, +byte )

put_byte(Stream, Byte) writes the byte Byte to the output stream Stream.

Note: in JavaScript, characters are represented using 16 bits, so, in broswer, putting a byte (an intenger between 0 and 255, represented using 8 bits) in the output stream will use that 8 bits as the 8 least significant bits of a character. When another put_byte is made, this new 8 bits will be used as the 8 remaining bits (the most significative ones) of said character. In the case of Node.js, the bits used to represent a character will depend on the file encoding.

Implementation