FANDOM


Syntax

UNGETBYTE number

Explanation

UNGETBYTE pushes the ASCII character corresponding to its input onto the input stream so that the next character input primitive will pick up the character.

Only one character can be pushed back at a time, so the character must be removed from the input stream before UNGETBYTE can be used again.

See also GETBYTE, GETBYTE.NO.ECHO, PEEKBYTE, and PUTBYTE.

Example

The following procedure performs the same function as the SKIP.EMPTY.LINES example in the PEEKBYTE entry. The procedure removes empty lines from the input stream and sends all other information to the output stream.

TO SKIP.EMPTY.LINES

MAKE "FIRST.CHAR.ON.LINE GETBYTE

TEST :FIRST.CHAR.ON.LINE = 13

IFF [UNGETBYTE :FIRST.CHAR.ON.LINE PR READLINE] SKIP.EMPTY.LINES

END

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.