sv2 := succ(sv1);
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".
Copyright © 1996, Thinkage Ltd.