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

Sven Barth pascaldragon at googlemail.com
Sat Feb 6 21:39:43 CET 2016


Am 06.02.2016 18:06 schrieb "Michael Van Canneyt" <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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160206/30048695/attachment-0003.html>


More information about the Lazarus mailing list