PROGRAM Ordinal1;
    TYPE
        SubRange = 15..20;
    VAR
        S: SubRange;
BEGIN
    WriteLn('Pred(5)=', Pred(5));
    WriteLn('Succ(4)=', Succ(4));
    WriteLn('Ord(11)=', Ord(11));

    S := 17;
    WriteLn('S=', S);
    WriteLn('Succ(S)=', Succ(S));
    WriteLn('Pred(S)=', Pred(S));
    WriteLn('Ord(S) =', Ord(S));      { Free Pascal Writes 17 instead of 2! }
END.
