[Lazarus] Easiest way to "case" strings
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Sat Mar 21 20:36:51 CET 2009
Alexander Klenin schrieb:
>> Can anyone say why there is no string case statement in Object Pascal? I've
>> always wondered about this as sometimes it hard to avoid 10-20 If..then..else
>> if.... statements.
>
> I'd say it is because nobody contributed it ;-)
There exist too many options with string comparison. In a table lookup
the compare method can be supplied by the application, in a case
statement this would require another syntax extension.
DoDi
More information about the Lazarus
mailing list