[Lazarus] A problem with extended ascii
pluma pluma
pluma000 at gmail.com
Fri Mar 27 09:14:07 CET 2009
Alexander Klenin schrieb:
>>> Since string was introduced as built-in "scalar" type with defined equality,
>>> lack of 'case' support can be viewed as a design bug.
>> IMO strings are similarly "scalar" as are floating point numbers, with
>> regards to 'case'.
>
> Note that I said "with defined equality". The reason 'case' should not include
> floating point numbers is that equality if not usefully defined for them.
The same for strings, where mere binary (case sensitive) equality often
is useless.
Furthermore Pascal 'case' supports ranges, which deserve a stricter
order than only equality. Then the sort order of strings also depends on
the encoding (codepage, MBCS, UTF...).
And last not least strings IMO are complex types (array of char), as
they have been in Wirth Pascal. The order of a comparison of ordinals is
O(1), whereas string comparison is O(n).
DoDi
More information about the Lazarus
mailing list