[Lazarus] errors: Upper bound of case range is less than lower bound and duplicate case label
bartjunk64 at gmail.com
Tue Jan 22 09:20:28 CET 2013
On 1/21/13, Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
> The lower-than and greater-than operators are defined for
> strings. Do you want to remove them too?
>> Ranges for strings are (countably) infinite, and this is (by design)
>> not the case in the case of other cases (pun intended).
No, you are missing the analogy I meant (or I did not make myself clear enough).
Case was originally meant for Ordinal values.
With Ordinal values ranges (1..100, 'a'..'z') are never infinite.
Pascal has never had the concept of ranges (in this sense) that are
infinite (countable or uncoutable).
You cannot define ranges for Floats (they would be uncoutable
infinite), and by that analogy I would suggest you should not be able
to define ranges for strings, as they are (coutbale) infinite.
The ability to have an infinite (countable or uncoutable) "range"
between two values for a given type however, does not mean you should
not have lesser than, or greater than operators. If this were the case
we'ld have to remove them for floats as well, and that would be rather
So my analogy was more with floats (but they have uncoutable infinite
ranges, as opposed to coutable infinity for strings).
More information about the Lazarus