Programmer's Guide to the Zeno Interpreter
Chapter 6. Some Input and Output
So far, you have seen examples of the put and get statements. This chapter explains all the features these statements provide and the standard subprograms for file input and output.
Put statements
The complete definition of the put statement is:
put [:stream,] put item{, put item}[...]
It is used for output of text data to files or the video display of your console. The value of stream must match an integer value obtained with the standard function open. If stream is omitted, the output is sent to the console for video display. A put item has the form:
expression [:width[:fraction width[:exponent width]]]
The expression can be of any standard type except boolean. The value of width is the total number of characters in the put item. Strings are left justified; numbers are right justified. The fraction width and exponent width options are for writing a number in a real number format. If a specified format is too small, the actual format width is increased to accommodate the item.
The optional ellipses ... symbol inhibits starting a new line after the last put item. Some examples:
put "hi":8
put 0.001:12:4:2
put 99:4
const pi : real := 3.1415926535
put pi
put pi:12
put pi:16:8:2
|