SUCC - successor of a scalar value.

Usage:

sv2 := succ(sv1);

Where:

sv1,sv2
have the same scalar type.

Description:

The "succ" function returns the "successor" of a scalar value. If "sv1" is an integer, the successor is simply the integer that comes after "sv1" (so "succ(1)" is 2). If "sv1" is a "char", the successor is the character that comes next in the ASCII collating sequence (so "succ('a')" is 'b'). If "sv1" is an enumerated value, the successor is the enumerated value that comes next in the enumeration list. For example, if we define

type
    days = (sun,mon,tue,wed,thu,fri,sat);

"succ(tue)" would be "wed".

See Also:

expl pascal lib pred

Copyright © 1996, Thinkage Ltd.