3
votes
Vote UpVote

Poll: dynamic arrays as reference or value type?

DelphiTools – Here is a small poll to help me decide in which direction to go about dynamic arrays in DWScript. The poll is at the bottom of the post, to encourage reading before voting . The Problem In Delphi, fixed-size arrays behave as value types, while dynamic arrays behave as reference type, this can be illustrated by: type TFixedSizeArray = array [0..9] of Integer; TDynamicArray = array of Integer; ... procedure SomeProc(fixed : TFixedSizeArray; dynamic : TDynamicArray); begin fixed[0]:=2; dynamic[0]:=2; end; ... var f : TFixedSizeArray; d : TDynamicArray; begin f[0]:=1; ...
Favorite? Off-Topic? Eric @ 2011-06-15 14:36

Statistics

Visits: 694
Votes: 3
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Ericc
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)