> On 29 Jun 2015, at 14:23, Henrik Johansen
> wrote:
>
>
>> On 29 Jun 2015, at 2:18 , abdelghani ALIDRA wrote:
>>
>> Hi guys,
>>
>> Is there any way to add an element to an empty array (must not use new:
>> anElement)?
>>
>> Cheers
>
> It sounds like you want to use an OrderedCollection,
Or if you want to create an array with elements already in it (this works
both for array and collections) you can also do
~~
{ anElement } "dynamic array syntax, Pharo-only"
~~
or
#('element') "static array, works only for scalars"
or
Array with:
> On 29 Jun 2015, at 2:18 , abdelghani ALIDRA wrote:
>
> Hi guys,
>
> Is there any way to add an element to an empty array (must not use new:
> anElement)?
>
> Cheers
It sounds like you want to use an OrderedCollection, not an Array.
Those will grow and shrink as needed when you use add:/rem
Hi guys,
Is there any way to add an element to an empty array (must not use new:
anElement)?
Cheers