DelphiTools – Latest DWScript SVN introduces support a new “for var” syntax extension for loops. It combines the loop with the loop variable declaration (type-inferred), while scoping the variable to the loop. The syntax of “for to/downto” loops is thus extended to: for var someVarName := lowBound to highBound [step someStep] do ... for var someVarName := highBound downto lowBound [step someStep] do ... On first approximation, it can considered to be a form of syntax-sugar for: begin var someVarName := lowBound; for someVarName := someVarName to highBound do begin ...
Visits by Source
Users who voted for this posting
Jørn E. Angeltveit