sv2 := pred(sv1);
The "pred" function returns the "predecessor" of a scalar value. If "sv1" is an integer, the predecessor is simply the integer that comes after "sv1" (so "pred(2)" is 1). If "sv1" is a "char", the predecessor is the character that comes next in the ASCII collating sequence (so "pred('b')" is 'a'). If "sv1" is an enumerated value, the predecessor is the enumerated value that comes previously in the enumeration list. For example, if we define
type days = (sun,mon,tue,wed,thu,fri,sat);
"pred(tue)" would be "mon".
Copyright © 1996, Thinkage Ltd.