next up previous
Next: Example Program sch.r Up: User-level Constructs Previous: Static Data

Input/Output

Currently there are no input constructs in R. However, there are two user-level output constructs, printword and println. These are rather ad-hoc. The set of I/O constructs is a part of R that is particularly likely to change in later versions of the language.



printword

Output a representation of a word of data.
Syntax:

 (printword  val)

Elements:
val ---
An expression for the word to print.

Description:

Printword sends to the output stream a representation of the value of the val expression, as a 32-bit integer. Currently the representation consists of outputing the value 0 followed by the given value, to distinguish the output from that produced by println.

The val expression is evaluated twice, once to compute the value and again to uncompute it.



println

Output a representation of a line-break delimiter.
Syntax:

 (println)

Elements:
None.
\

Description:

Println sends to the output stream a representation of a line-break delimiter. Currently this consists of outputing the single word 1.



Michael Frank
Mon Nov 3 16:33:38 EST 1997