MAKE "STANDARD.INPUT streamnumber
STANDARD.INPUT is a pre-defined name which controls the source of the Logo input stream. When Logo starts up, the default value of STANDARD.INPUT is 0, which means that all input into Logo is read from the keyboard.
To change the source of the input stream to another device such as disk file, the device must be opened or created to prepare it for input, and STANDARD.INPUT assigned a new value.
The following procedures print the contents of a file to the screen.
TO ECHO :FILE
- IF NOT FILE? :FILE (PR :FILE[DOES NOT EXIST]) STOP
- MAKE "OLDSTREAM :STANDARD.INPUT
- MAKE "STANDARD.INPUT OPEN :FILE
- CLOSE :STANDARD.INPUT
- MAKE "STANDARD.INPUT :OLDSTREAM
- MAKE "CHAR RC
- IF :CHAR = "EOF STOP
- TYPE :CHAR