Module Out Reference

Module Out provides a set of basic routines for formatted output of characters, numbers and strings. It assumes a standard output stream to which the symbols are written.

The output is buffered. The buffer is flushed when and overflow occurres or when Flush or Ln are called.

Constants

This section is empty.

Types

This section is empty.

Variables

This section is empty.

Procedures

PROCEDURE Char (ch: CHAR);

Writes the character ch to the end of the output stream

PROCEDURE Flush;

Flushes the output buffer to the output device

PROCEDURE Hex (x: HUGEINT; n: HUGEINT);

Writes x as hexadecimal integer to the end of the output stream.

n is the minimum amount of characters that should be written. If the textual representation of x takes less characters, then zeroes are written first. If n is 0 or 1, n means nothing.

PROCEDURE Int (x: HUGEINT; n: HUGEINT);

Writes the integer number x to the end of the output stream.

n is the minimum amount of characters that should be written. If the textual representation of x takes less characters, then spaces are written first. If n is 0 or 1, n means nothing.

PROCEDURE Ln;

Writes an end-of-line symbol to the end of the output stream.

On Linux/Unix it is 0AX. On Windows it is a pair: 0DX, 0AX.

PROCEDURE LongReal (x: LONGREAL; n: INTEGER);

Writes the long real number x to the end of the output stream in an exponential form.

n is the minimum amount of characters that should be written. If the textual representation of x takes less characters, then spaces are written first.

PROCEDURE LongRealFix (x: LONGREAL; n: INTEGER; k: INTEGER);

Writes the long real number x to the end of the output stream in a normal form.

n is the minimum amount of characters that should be written. If the textual representation of x takes less characters, then spaces are written first.

k is the number of digits after a decimal point.

PROCEDURE Open;

Initializes the output stream.

On Windows, Unix and Linux does nothing.

PROCEDURE Real (x: REAL; n: INTEGER);

Writes the real number x to the end of the output stream in an exponential form.

n is the minimum amount of characters that should be written. If the textual representation of x takes less characters, then spaces are written first.

PROCEDURE RealFix (x: REAL; n: INTEGER; k: INTEGER);

Writes the real number x to the end of the output stream in a normal form.

n is the minimum amount of characters that should be written. If the textual representation of x takes less characters, then spaces are written first.

k is the number of digits after a decimal point.

PROCEDURE String (VAR s: ARRAY OF CHAR);

Writes the null-terminated character sequence s to the end of the output stream (without 0X).

PROCEDURE Utf8 (VAR s: ARRAY OF SHORTCHAR);

Writes the null-terminated 1-byte-character sequence s encoded in UTF-8 to the end of the output stream (without 0X).