Sign in Join
FPDoc Onlineexperiment

Pred function

In unit System

Return previous element for an ordinal type.

Declaration

pascal
function Pred(X: TOrdinal): TOrdinal

Description

Pred returns the element that precedes the element that was passed to it. If it is applied to the first value of the ordinal type, and the program was compiled with range checking on ( {$R+}), then a run-time error will be generated.

For an example, see Ord

You cannot use this function on enumerations with assigned values.

Errors

Run-time error 201 is generated when the result is out of range.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.