{
Pred, Succ example
}
uses Dialogs;
type
   Colors = (RED,BLUE,GREEN);
 var
   S: string;
 begin
   S := 'The predecessor of 5 is ' + IntToStr(Pred(5)) + #13#10;
   S := S + 'The successor of 10 is ' + IntToStr(Succ(10)) + #13#10;
   if Succ(RED) = BLUE then
     S := S + 'In the type Colors, RED is the predecessor of BLUE.';
   MessageDlg(S, mtInformation, [mbOk], 0, mbOk);
 end; 
