On Wed, Nov 4, 2009 at 08:03, Thaddy <tha...@thaddy.com> wrote: > Alexander Klenin wrote: >> >> I have started testing the new for..in code. >> The very first test I tried found a bug ;-) >> --- >> const S = 'abc';//<----??? >> var ch: Char; >> begin >> for ch in S do Writeln(ch); >> end. >> --- >> > > I suppose you refer to the fact that the compiler should never allow this ;)
I refer to the fact that iteration starts from position 0 instead of 1. I think this is just a minor glitch in ShortString vs AnsiString detection. > Or do you want this to actually work?? An untyped const is fine with me and > I use it for years, but should it be allowed for for..in? Do not see a reason why not. -- Alexander S. Klenin _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel