the nice thing about pascal, is that compile support different code compilers syntax: {$mode ...}
if anyone likes, he/she can implement additional {$mode} for the compiler, right? this new {$mode} can be included into compiler packages, and if necesssary anyone can rebuild the compiler to support this new mode! there're a lot of threads talking about "it's so cool to have this feature...". But fpc is open source, so feel free to implement it your own modes :) anyway, about topic: type TDays: (Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday); TDaySet: set of TDays; var d: TDaySet; begin for d in [Monday,Wednesday,Friday] do ; // versus for d:=Low(TDaySet) to High(TDaySet) do if d in [Monday,Wednesday,Friday] then ; end; here's another nice way to implement this without overhead: open-arrays! procedure DayLoop(const Days: array of TDays); var i : integer; begin for i := 0 to length(Days) - 1 do Days[i]... end; ... DayLoop( [Monday,Wednesday,Friday] ); .. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal