Array literals have changed?
ken at ineffable.com
Sat Jan 12 23:06:46 UTC 2002
OK, I'm beginning to think that I'm missing the obvious. As mentioned
in a previous email I'm working through Guzdial's _Squeak OODMA_ and to
be more specific I'm working on Exercise 8 of Chapter 2 on page 47. I'm
asked to implement a method switchOn that can be used like
#( ('a' [Transcript show: 'An a was input'])
('b' [Transcript show: 'A b was input']) )
I believe that the Array literal above should result in an Array of 2
elements, each element being an Array of 2 elements (a String and a
BlockContext). But... What I end up with is an Array of 2 elements,
each element being an Array of 6 (yes six) elements. To be most
specific when I inspect element 1 of the outer Array I get an array
5: 'An a was input'
Is this correct behaviour?
More information about the Squeak-dev