/sys$common/syshlp/helplib.hlb PASCAL, Input Output, Text File, WRITELN *Conan The Librarian (sorry for the slow response - running on an old VAX) |
The WRITELN procedure writes a line of data to a text file. Syntax: WRITELN [[( [[file_variable,]] {expression},... [[, ERROR := error-recovery]] )]] The 'file_variable' is the name of the file variable associated with the text file to be written. If you omit the name of the file, the default is OUTPUT. The 'expression' is an expression whose value is to be written; multiple output values must be separated by commas. The expressions can be of any ordinal, real, or string type and are written with a default field width. The 'error-recovery' specifies the action to be taken if an error occurs during execution of the routine. By default, after the first error, the error message is printed and execution is stopped. The file must be in generation mode before WRITELN is called; it remains in that mode after WRITELN has been executed. The WRITELN procedure writes the specified values into the TEXT file, inserts an end-of-line marker after the end of the current line, and then positions the file at the beginning of the next line. You can specify a carriage-control character as the first item in an output line. When you use carriage-control characters, make sure that the file is open with either the CARRIAGE or FORTRAN option. If you specify a carriage format but use an invalid carriage control character, the first character in the line is ignored. The output appears with the first character truncated. See the "Compaq Pascal Language Reference Manual" for a complete description of the WRITELN procedure.
|