Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
Rreturns the successor of the ordinal value.
Succ goes to the element listed after X in the type declaration. Succ(x) is the same as Inc(x,1) - the diference is that Inc changes the x variable (it's procedure) and Succ does not (function).
Ordinal and Enumerated Data Types
type TExperience=(Beginner, Intermediate, Advanced);
var aProg : TExperience;
aProg := Intermediate;
aProg := Succ(aProg);
//aProg = Advanced
Learn about Delphi's support for ordinal types. Extend Delphi's built-in types by constructing your own types.
Free Delphi code snippet inside every Delphi Newsletter!|
Got some code to share? Got a question? Need some help?|