Batch Mode Simulation : File Operation Statements : WRITE Statement

WRITE Statement

The WRITE statement outputs data to either a file or the display. The output may be any combination of printable characters and numeric values.

WRITE ( [file_variable, ] exp1 [, exp2 . . . ]
[ \n’ ] );

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:

WRITE (‘The data value is ’, d1, ’\n’);

To display or print integers in hexadecimal format:

1.

Variables

BITARRAY hexa_int(0..31);

2.
3.