[Lazarus] [OFF-TOPIC] HttpGetResume, Excelente solução!
Silvio Clécio
silvioprog at yahoo.com.br
Sun Mar 22 03:25:16 CET 2009
It should be space and case sensitive... the programmer can add
trim(lowercase(s)) to the case argument...
Encodings are going to make it much trickier... but whatever encoding is
supported in the IDE.
2009/3/21 Michael Van Canneyt <michael at freepascal.org>
>
>
> On Sat, 21 Mar 2009, Flávio Etrusco wrote:
>
> > >>
> > >> 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.
> > >>
> > >> Would the compiled code of a string case statement even be any more
> efficient or
> > >> is the benefit mostly in code readability?
> > >
> > > In the case of strings, it would mostly be code readability. For
> ordinal
> > > types, a case statement can be optimized using jump tables.
> > >
> > > Michael.
> >
> > A string case could be optimized with compile-time hashes or something
> else.
>
> Even so, there are some serious issues with a string 'case' as a language
> construct:
> - What about encodings ?
> - Should it be case sensitive or not ?
> I don't think that these can be solved in a satisfying manner on a language
> level.
>
> Michael.
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
--
o__
,_.>/ _
(_)_\(_)_______
...speed is good
_______________
I believe five out of four people have a problem with fractions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20090321/669fb14e/attachment-0007.html>
More information about the Lazarus
mailing list