[Lazarus] Can I assign items in an array all at once inFreePascal?

Vojtěch Čihák vojtech.cihak at atlas.cz
Sat Feb 6 22:03:29 CET 2016


Hmm, really: http://blog.marcocantu.com/blog/2014_september_dynamic_arrays_delphixe7.html
 
V.
______________________________________________________________
> Od: Sven Barth <pascaldragon at googlemail.com>
> Komu: Lazarus mailing list <lazarus at lists.lazarus.freepascal.org>
> Datum: 06.02.2016 21:40
> Předmět: Re: [Lazarus] Can I assign items in an array all at once inFreePascal?
>
Am 06.02.2016 18:06 schrieb "Michael Van Canneyt" <michael at freepascal.org <michael at freepascal.org>>:
>
>
>
> On Sat, 6 Feb 2016, Aradeonas wrote:
>
>> Michael can I ask why we cant do something like this :
>>>
>>>  MyArr :=[10, 20, 30, 40];   
>
>
> Because of 2 reasons:
>
> 1. Delphi introduced the create constructor.
>
> 2. A literal such as [10,20,30,40] is a set in pascal, not an array.
The answer is no longer correct with current Delphi versions. It now is "because we haven't implemented it yet".
Regards,
Sven


----------

--
_______________________________________________
Lazarus mailing list
Lazarus at lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus <http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160206/31a69882/attachment-0003.html>


More information about the Lazarus mailing list