[Newbies] question on differences between images

Jordi Delgado jdelgado at lsi.upc.edu
Mon Jan 15 11:51:47 UTC 2007


Hi,

My name is Jordi Delgado and this is my first message
to this list. After reading the 'purple book',
I've chosen Squeak to practice what I've learnt.

Following Guzdial's book and trying to solve exercise 8
of chapter 2 (chapter 2!!; what kind of 'introductory'
book is this?), and making a long story short,
I got to this piece of code:

|  f  |
f := #('a'   [Transcript show: 'An a was input']).
f := (f copyFrom: 2 to: f size).
(Compiler evaluate: f) class

Selecting and printing gives the following result:
Squeak Image 2.5 --> BlockContext
Squeak Image 3.9 --> Array

I've been playing with the method evaluate: (and variants)
of the Compiler class in order to get some clue as to
what is the reason of this behavior, but I guess I do not
know enough Smalltalk to succeed.

Any help will be much appreciated.

Thanks in advance,

Bests,

Jordi







More information about the Beginners mailing list