[Lazarus] Can I assign items in an array all at once in FreePascal?
Michael Van Canneyt
michael at freepascal.org
Sat Feb 6 15:46:32 CET 2016
On Sat, 6 Feb 2016, Aradeonas wrote:
> Hi, As question explained here
> http://stackoverflow.com/questions/6493727/can-i-assign-items-in-an-array-all-at-once-in-delphi-pascal
> and the easiest answer is :
>> type
> TIntArray =arrayof integer;procedure TForm1.Button1Click(Sender:
> TObject);var MyArr: TIntArray;begin MyArr :=
> TIntArray.Create(10,20,30,40);end;
>
> But problems are : Lazarus doesnt recognize Create for array but FPC
> will compile it but it seems it doesnt work so I want to ask what should
> I do for assign items in an array all at once in FreePascal?
The above is the only correct solution.
If the Lazarus codetools do not recognize this, then a bug report should be created for
the IDE codetools.
Michael.
More information about the Lazarus
mailing list