[fpc-pascal] For..in enumerator for generic records?

Ryan Joseph ryan at thealchemistguild.com
Wed Nov 30 12:36:01 CET 2016



> On Nov 30, 2016, at 6:24 PM, Graeme Geldenhuys <mailinglists at geldenhuys.co.uk> wrote:
> 
> What would you iterate/enumerate in that?  I can understand iterating an
> "array of TMyRec", but not TMyRec itself.

I have a dynamic array inside a record. I’m using a record instead of a class because I want it to be stored on the stack. It’s trivial to just enumerate the array inside the record but I wanted to try the more elegant solution of  making an enumerator for the record.

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list