FANDOM


Syntax

PEEKBYTE

Explanation

PEEKBYTE outputs the ASCII value of the next character waiting on the input stream. The character is left in the input stream for subsequent READ, READCHAR, READLINE, READLIST, READQUOTE, or other input primitives.

Example

The following procedure prints the text of a file in Logo without loading file into workspace.

TO TYPE.FILE :FILE

LOCAL "CHANNEL

MAKE "CHANNEL OPEN :FILE

IF :CHANNEL = "FALSE (PR :FILE [NOT FOUND.]) STOP

MAKE "STANDARD.INPUT :CHANNEL

NOCASE

WHILE [NOT PEEKBYTE = :EOF] [PRINT READQUOTE] CASE

CLOSE "STANDARD.INPUT

MAKE "STANDARD.INPUT 0

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.