3
votes
Vote UpVote

“new” keyword and “default” constructors

DelphiTools – DWScript SVN version just introduced support for the “new” keyword and “default” constructors. The syntax is similar to that of Oxygene/Prism, you can now create a new instance with obj1 := new TSomeObject; obj2 := new TSomeOtherObject(param1, param2); By default, the above syntax will be duck-typed to the .Create constructor of a given class, but you can alternatively specify a “default” constructor (one per class) to select a specific named constructor that “new” will use: type TSomeClass = class constructor ImTheOne; default; end; The ...
Favorite? Off-Topic? Eric @ 2011-06-27 11:33

Statistics

Visits: 782
Votes: 3
Favorites: 0
Off-Topic: 1

Visits by Source

User Actions

Users who voted for this posting

Daniele Teti
knight_killer
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)