[fpc-devel] New feature discussion: for-in loop
Graeme Geldenhuys
graemeg.lists at gmail.com
Tue Oct 20 11:29:32 CEST 2009
On 20/10/2009, Alexander Klenin <klenin at gmail.com> wrote:
>
> Hm. I can not see where lookahead aka peeking
> is required in using any of the enumerators you mention.
> UTF8String enumerator is even among the samples on the wiki page.
>
I just completed a parser for a custom RichText component I wrote for
fpGUI Toolkit. This will probably apply to HTML, XML etc as well. Say
you have the following string
"Hello <b>World</b>!:
When I parse that and I get the the "<" characters, I peak ahead to
see if I am working with a actual styling tag, or if I am working with
the actual "<" character in the contents. So when I tokenize that
string, with the help of "peak ahead" I know what token type to set.
>
> >> Please read again with more attention ;-)
> > BTW: The wiki pages does not contain the word "reverseEnumerators" as
> > you suggested earlier.
>
>
> My bad. I skipped space between words.
Please pay more attention to the wiki article! :-) Neither "reverse
Enumerators" nor "reverseEnumerators" are text in the for-in loop wiki
page. At least that is what Firefox tells me when I do a Find.
--
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the fpc-devel
mailing list