7
votes
Vote UpVote

New “for var” syntax in DWScript

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 ...
Favorite? Off-Topic? Eric @ 2012-11-19 08:45

Statistics

Visits: 741
Votes: 7
Favorites: 0
Off-Topic: 1

Visits by Source

User Actions

Users who voted for this posting

Ericc
François
Jørn E. Angeltveit
Linas
Mohammed Nasman
Primoz Gabrijelcic
Zzzzz
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)