[logo] I/O Package Reference

Package Information

[Name]

io

[Overview]

Provides I/O functions for console and files (file I/O has not been implemented yet).

>>Predicates

Primitives

nl   <Console New Line>

Outputs a new line to the console.

[Where]

Guard

read(X)   <Console Input>

Inputs a term from the console, and unifies it with X.

[Where]

Guard

write(X)   <Console Output>

Outputs X to the console.

Waits until X is instantiated and contains no variable.

[Where]

Guard

writeln(X)   <Console Output with New Line>

Outputs X, and then a new line, to the console.

Waits until X is instantiated and contains no variable.

[Where]

Guard

Processes

instream(Xs)   <Stream Input>

Sequentially processes the I/O commands cast into the stream Xs.

The I/O commands have the same forms and meanings as I/O Primitives.

A user may need to type in as a result of seeing outputs on the console, so that instream needs to process sequentially all kinds of I/O commands.

[Where]

Body

outstream(Xs)   <Stream Output>

Sequentially processes the output commands cast into the stream Xs.

The output commands have the same forms and meanings as I/O Primitives, but do not include read.

[Where]

Body

print(X)   <Console Output>

Outputs X to the console.

Waits until X is instantiated and contains no variable.

[Where]

Body

println(X)   <Console Output with New Line>

Outputs X, and then a new line, to the console.

Waits until X is instantiated and contains no variable.

[Where]

Body

printstream(Xs)   <Stream Output to Console>

Outputs to the console the content of the stream Xs sequentially from its top, each with a new line.

[Where]

Body