[Lazarus] errors: Upper bound of case range is less than lower bound and duplicate case label

Sven Barth pascaldragon at googlemail.com
Sun Jan 20 18:43:44 CET 2013


On 20.01.2013 18:40, Eric Kom wrote:
> Good afternoon all,
>
> Please after write the above procedure, I received the errors: Upper
> bound of case range is less than lower bound and duplicate case label
>
> procedure DisplayGrade(Sender: TObject);
> var
>    grade    : String;
>    tuitionFee: String;
>    gradeSelected: String;
> begin
>     gradeSelected := cbbGradeList.Items[cbbGradeList.ItemIndex];
>     case gradeSelected of
>          '12'..'12': tuitionFee := '14500.00';

            ^       ^   This should be easy to spot...

>          '8'..'11' : tuitionFee := '13500.00';
>          '1'..'7'  : tuitionFee := '8000.00';
>     else
>          tuitionFee := '850.00';
>     end;
>
> end;
>

Regards,
Sven




More information about the Lazarus mailing list