next up previous contents
Next: Operator Precedence Up: Simple Input / Output Previous: PRINT Statement

 

READ Statement

This is the simplest form of reading unformatted data from the standard input channel, for example, if the type declarations are the same as for the PRINT example,

    READ*, long_name
    READ*, x, y, z
    READ*, lacigol

would read the following input from the keyboard

    Llanphairphwyll...gogogoch
    0.4 5. 1.0e12
    T
Note,

The * format specifier the READ statement is comparable to the functionality of PRINT, in other words, unformatted data is read. (Actually this is not strictly true formatted data can be read but the format cannot be specified!) As long as each entity to be read in is blank separated the READ statement simply works through its `argument' list. Each READ statement begins a new line so if there are less arguments to the read statement than there are entries on a line the extra items will be ignored.

Return to corresponding overview page gif


next up previous contents
Next: Operator Precedence Up: Simple Input / Output Previous: PRINT Statement

©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997
Not for commercial use.