Regarding my previous post on Enumerating enum types in Delphi I asked claude.ai: Question: I need a way to iterate over all values of an enum type in Delphi. Something like: [delphi] var e: SomeEnumType; for e in SomeEnum do begin doSomethingWith(e); end; [/delphi] But that doesn't compile. I'd like to avoid programming a for-loop … Continue reading Enumerating enum types in Delphi AI answer
Day: January 15, 2026
Enumerating enum types in Delphi
One would have thought that enumerating enum types in Delphi would be a no brainer, after all they have it in the name already. But this does not compile: [delphi] var L: TSomeEnumType; begin for L in TSomeEnumType do begin doSomethingWith(L); end; end; [/delphi] So I though I'd just wrap it into a record and … Continue reading Enumerating enum types in Delphi