[squeak-dev] Immediate array of objects?
tim Rowledge
tim at rowledge.org
Wed Jan 4 18:20:51 UTC 2023
It may not be obvious from Marcel's example but you need the full-stop between each clause inside the {}. Forgetting it can result in 'interesting' debugging times. DAMHIKT.
> On 2023-01-04, at 8:40 AM, Stephen Travis Pope <stephen at heaveneverywhere.com> wrote:
>
>
> Mille Grazie!
>
> stp
>
> --------
>
> Stephen Travis Pope Ojai, California, USA
> <pastedGraphic.tiff>
> http://HeavenEverywhere.com
> http://FASTLabInc.com
> https://vimeo.com/user19434036/videos
> http://heaveneverywhere.com/Reflections
>
>
>
>> On Jan 4, 2023, at 8:20 AM, Taeumel, Marcel <Marcel.Taeumel at hpi.de> wrote:
>>
>> Hi Stephen --
>>
>> #( ... ) is for literal arrays.
>> { ... } is for object arrays.
>> #[ ... ] is for byte arrays.
>>
>> I think you want object arrays:
>>
>> {(80 to: 90) . (60 to: 70)}
>>
>> Best,
>> Marcel
>>> Am 04.01.2023 17:04:48 schrieb Stephen Travis Pope <stephen at heaveneverywhere.com>:
>>>
>>>
>>> Hello all,
>>>
>>> Has the interpretation of immediate arrays, i.e., #(obj1 obj2) changed?
>>>
>>> I have loads of code (from ST80) that creates arrays of intervals like,
>>>
>>> #((80 to: 90) (60 to: 70))
>>>
>>> where what I want is,
>>>
>>> (Array with: (80 to: 90) with: (60 to: 70))
>>>
>>> but Squeak reads this as,
>>>
>>> ampl: #(#(80 #to: 90) #(60 #to: 70))
>>>
>>> Am I missing something?
>>>
>>> stp
>>>
>>> --------
>>>
>>> Stephen Travis Pope Ojai, California, USA
>>> pastedGraphic.tiff
>>> http://HeavenEverywhere.com
>>> http://FASTLabInc.com
>>> https://vimeo.com/user19434036/videos
>>> http://heaveneverywhere.com/Reflections
>>>
>>>
>>>
>>
>
>
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Fractured Idiom:- POSH MORTEM - Death styles of the rich and famous
More information about the Squeak-dev
mailing list
|