3
votes
Vote UpVote

Fields default values, anonymous records

DelphiTools – Recent additions to DWScript… as well as for next Smart MS version Fields default values Record and class fields can now have default values, and can be type-inferenced. The same syntax works both in record declarations and class declarations, and you can use ‘=’ or ‘:=’ for the assignment, for instance type TMyClass = class Field1 := 'hello'; Field2 : Integer = 123; end; Will specify that all new instances of TMyClass will have Field1 set to ‘hello‘ by default (instead of an empty string), and Field2 will be initialized to 123. As ...
Favorite? Off-Topic? Eric @ 2012-05-29 11:01

Statistics

Visits: 596
Votes: 3
Favorites: 0
Off-Topic: 2

Visits by Source

User Actions

Users who voted for this posting

Ericc
Jørn E. Angeltveit
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)