The
WRITE
statement outputs data to either a file or the display. The output may be any combination of printable characters and numeric values.The first parameter is optionally a file identifier indicating that the target of the
WRITE
is a file. If not provided, the data is written to standard output (display). The optional argument ‘\n’ outputs a carriage return between lines. For example:To display or print integers in hexadecimal format:
1.