nielsAD / lape

Scripting engine with Pascal-like syntax for FPC and Delphi
119 stars 28 forks source link

Support looping sets & enums with for..in #151

Closed ollydev closed 3 years ago

ollydev commented 3 years ago
type
  ETestEnum = (TestA = 50, TestB = 60, TestC, TestD);
  ETestSet = set of ETestEnum;
var
  Test: ETestEnum;
  TestSet: ETestSet = [TestA, TestD];
begin
  for Test in ETestEnum do
    WriteLn(Test);
  for Test in TestSet do
    Writeln(Test);
end.

Hooray!

slackydev commented 3 years ago

Nice