Contents | Prev | Next

7.4.62 The write procedure

Description

The write procedure writes values to the file associated with a file variable.

Parameters

  1. The first parameter is optional, and if supplied is a reference to the file variable associated with the file to write to. If this parameter is not supplied then the write procedure writes values to the file associated with output.
  2. The other parameters are called write parameters, and specify the values to be written to the file.

Example

   write(true);          (* writes '    true' *)
   write(true:2);        (* writes 'tr' *)
   write(3567);          (* writes '    3567' *)
   write(3567:1);        (* writes '3567' *)
   write(1.2345678);     (* writes ' 1.23E+00' *)
   write(1.2345678:8);   (* writes ' 1.2E+00' *)
   write(1.2345678:8:3); (* writes '   1.235' *)

Portability

Operating Systems: All
Standard Pascal: Yes

Contents | Prev | Next