[Newbies] Best way to implement two-dimensional array
Bert Freudenberg
bert at freudenbergs.de
Mon Sep 3 07:26:43 UTC 2007
See
http://www.mucow.com/squeak-qref.html#BraceArray
Another common way is to use a literal array #(...) and convert that
into a Dictionary with a few statements. That way you use only a
single literal.
- Bert -
On Sep 2, 2007, at 19:54 , John Almberg wrote:
> Ah... Now that's handy. Though it's not clear, at first glance, how
> it works...
>
> Those curly braces aren't standard Smalltalk, are they? I need to
> Google them.
>
> Anyway, thanks for the tip. That will make life much easier... I
> was starting to think my table initialization was going to have a
> lot of add: statements...
>
> -- John
>
>
> On Sep 2, 2007, at 3:05 PM, Bert Freudenberg wrote:
>
>> No, but this comes close:
>>
>> {'key1'->'value1'. 'key2'->'value2'} as: Dictionary.
>>
>> - Bert -
>
More information about the Beginners
mailing list