[fpc-pascal] for..in loops?

Alan Mead cubrewer at yahoo.com
Fri Nov 18 22:18:40 CET 2005

I use Perl a lot so the new for..in loops in Delphi caught my eye:

program ForIn;
type TStringArray = array of String;
procedure Demo1(const List: TStringArray);
var S: String;
  for S in List do writeln(S);
var sa: TStringArray;

fpc 2.0.0 doesn't compile this... are "for..in" loops in a newer
version or will they be sometime soon?  Here is a little blurb about
it from Google's cache:

I'm still using Delphi 7... so it's not clear if this is already
available or in the new Delphi 2006 available next year...


More information about the fpc-pascal mailing list