[Lazarus] errors: Upper bound of case range is less than lower bound and duplicate case label
Flávio Etrusco
flavio.etrusco at gmail.com
Mon Jan 21 15:37:28 CET 2013
On Mon, Jan 21, 2013 at 7:00 AM, Sven Barth <pascaldragon at googlemail.com> wrote:
> Am 21.01.2013 04:54, schrieb Alexander Klenin:
>
>> On Mon, Jan 21, 2013 at 4:43 AM, Sven Barth <pascaldragon at googlemail.com>
>> wrote:
>>>>
>>>> case gradeSelected of
>>>> '12'..'12': tuitionFee := '14500.00';
>>>
>>>
>>> ^ ^ This should be easy to spot...
>>
>> No, the error is in the line below.
>>
>>>> '8'..'11' : tuitionFee := '13500.00';
>>
>> Note that strings are not numbers, so '8' > '11'.
>> Also, '1' < '11' < '7' < '8', so case branch labels intersect, which
>> is the reason for the second error.
>>
> Right... I forgot that this is a case of string -.-
>
> Regards,
> Sven
Should case of string really allow ranges?
More information about the Lazarus
mailing list