Class creator like syntax for dynarrays (Delphi compat)
Original Reporter info from Mantis: marco @marcoonthegit
-
Reporter name: Marco van de Voort
Original Reporter info from Mantis: marco @marcoonthegit
- Reporter name: Marco van de Voort
Description:
Delphi supports the below class like syntax to intialized arrays.
Another D8/D2005 "feature"
From
http://blogs.teamb.com/rudyvelthuis/2005/05/13/4311
Additional information:
program dynarrayclass;
{$ifdef Fpc}
{$mode delphi}
{$else}
{$apptype console}
{$endif}
type
TDoubleArray = array of Double;
var
A: TDoubleArray;
D: Double;
begin
A := TDoubleArray.Create(1.7, 3.9, 17.1, 39.7, 42.0);
for D in A do
Writeln(D:1:1);
end.
Mantis conversion info:
- Mantis ID: 15385
- Fixed in version: 3.0.0
- Fixed in revision: 19045 (#ec29fddd)