next up previous contents index
Next: Procedures Up: Input and Output Previous: Customized I/O Routines

Caveats

  Customized I/O routines can only be bound to parallel variables, that is, a single identifier that contains no array indexing, no record field names, and no @'s. For example, A is a legal variable name but A.x is not.

I/O statements are considered to be parallel procedures because the multiple processes must coordinate to print expressions--both sequential and parallel--in a coherent manner. Thus, it is illegal to promote read(), write(), or writeln(). This is illustrated below:

    var  A : [R] float;
    procedure print_float (var a: float);
    begin
        write(a);
    end;

    . . .
    print_float(A);           -- illegal promotion of a parallel procedure



Kay Nettle
Fri Feb 21 21:14:29 CST 1997