On Sat, 17 May 2014 13:18:01 +0200 Jürgen Hestermann <juergen.hesterm...@gmx.de> wrote:
> > Am 2014-05-17 10:39, schrieb Mattias Gaertner: > > I added a note to the example, that the enumerator is automatically freed > > by the compiler after the loop. > > > I just had a look at the UTF8 example on > http://wiki.freepascal.org/for-in_loop where is says: > > ------------------------------------------------ > for i := 1 to Length(s) do > DoSomething(ch[i]); > ------------------------------------------------ > > Isn't this wrong as i iterates over bytes but but not over (UTF8) characters? Yes. I replaced the example with a full implementation and some comments. Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal