Input and output under program control

In the programs we've written so far this semester, we've relied on the Chez Scheme interactive interface to collect the input. We've assumed that the users of our programs know enough about Scheme to formulate a call to at least one of the procedures that we've defined.

Unfortunately, this simplifying assumption doesn't always hold. In many cases, we'd like our program to take over the job of interacting with users, reading in values and writing out computed results without the assistance of the interactive interface.

To support programs of this kind, Scheme provides several procedures that perform interactive input or output. We have already encountered two of them: display and newline. The others are: