Next: , Previous: , Up: stdlib io port   [Index]


5.8.2.12 Textual output

Procedure: put-char textual-output-port char

Write char to the port. Return unspecified values.

Procedure: put-string textual-output-port string
Procedure: put-string textual-output-port string start
Procedure: put-string textual-output-port string start count

start and count must be non–negative exact integer objects. string must have a length of at least start+count.

start defaults to 0. count defaults to:

(- (string-length string) start)

The put-string procedure writes the count characters of string starting at index start to the port. The put-string procedure returns unspecified values.

Procedure: put-datum textual-output-port datum

datum should be a datum value.

The put-datum procedure writes an external representation of datum to textual-output-port. The specific external representation is implementation–dependent. However, whenever possible, an implementation should produce a representation for which get-datum, when reading the representation, will return an object equal (in the sense of equal?) to datum.

NOTE Not all datums may allow producing an external representation for which get-datum will produce an object that is equal to the original. Specifically, NaNs contained in datum may make this impossible.

NOTE The put-datum procedure merely writes the external representation, but no trailing delimiter. If put-datum is used to write several subsequent external representations to an output port, care should be taken to delimit them properly so they can be read back in by subsequent calls to get-datum.