HP Pascal/iX Reference Manual (31502-90022)

9- 32
Description
The pred function returns the value whose ordinal number is one less than
the ordinal number of the argument. The type of the result is identical
to the type of the argument. pred(
x
) must exist.
Example
Input Result
pred(ord_var) depends on the value of ord_var
pred(1) 0
pred(-5) -6
pred('B') 'A'
pred(true) false
pred(false) {error}
succ
succ
(x)
Argument
x
Any ordinal expression.
Description
The succ function returns the value whose ordinal number is one greater
than the ordinal number of the argument. The type of the result is
identical with the type of the argument. It is an error if succ
(x)
does
not exist.
Example
Input Result
succ(ord('b')) 99
succ(1) 2
succ(-5) -4
succ('a') 'b'
succ(false) true
succ(true) { error }