A port must be open before it can be read from or written to. Additional procedures let you open ports to strings. Many input procedures, such as read-char and read , read data from the current input port by default, or from a port that you specify. Similarly, many output procedures, such as write-char and display , write data to the current output port by default, or to a port that you specify. All ports read or write only ascii characters.
Every port is either an input port, an output port, or both.
The following predicates distinguish all of the possible cases. Otherwise they return object . The next five procedures return the runtime system's standard ports . When the rep loop exits, the ports revert to their original values. This is the default port used by many input procedures.