The writeln procedure


The writeln procedure writes a line into a text file.


  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 writeln procedure writes lines to the file associated with output.
  2. The other parameters are optional, and if supplied are write parameters that specify the values in the line to be written to the file.


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


Operating Systems: All
Standard Pascal: Yes