Standard subroutines

Ord function

Returns the ordinal value of an argument that must be of an ordinal type.

Syntax

Ord(arg: <ordinal-type>): integer

Ordinal value of

Chr function

Returns the character value of an integer ASCII code 0..255.

Syntax

Chr(arg: integer): char

Sin function

Returns the sine of a real argument in radians.

Syntax

Sin(arg: real): real

Cos function

Returns the cosine of a real argument in radians.

Syntax

Cos(arg: real): real

ArcTan function

Returns the arcus tangent of a real argument.

Syntax

ArcTan(arg: real): real

Abs function

Returns the absolute value of an integer or a real argument.

Syntax

Abs(arg: integer): integer
Abs(arg: real): real

Succ function

Returns the successor of an ordinal type argument.

Syntax

Succ(arg: <ordinal-type>): <ordinal-type>

Pred function

Returns the predecessor of an ordinal type argument.

Syntax

Pred(arg: <ordinal-type>): <ordinal-type>

Min function

Returns the minimum of two values of an integer or a real type.

Syntax

Min(left, right: integer): integer
Min(left, right: real): real

Max function

Returns the maximum of two values of an integer or a real type.

Syntax

Max(left, right: integer): integer
Max(left, right: real): real

Sqrt function

Returns the square root of an integer a real type argument as real.

Syntax

Sqrt(arg: integer): real
Sqrt(arg: real): real

Write procedure

Writes arguments to standard output stream.

Syntax

Write(arg1, ..., argN)

Writeln procedure

Writes arguments followed by a newline to standard output stream.

Syntax

Writeln(arg1, ..., argN)