[Cuis] Basic & probably stupid question.

nacho 0800nacho at gmail.com
Mon Nov 23 08:37:07 CST 2015


Hi Folks,
I'm trying an example from Inside Smalltalk vol.1

When I try to print:

| anArray |
anArray _ Array new.
anArray at: 1 put: 'hello'; at: 2 put: 'nacho'; at: 3 put: 'pepito'.

I receive:
subscript is out of bounds: 1
Where as according to the book I should receive the 3th element.

The same happens when I try to print:
| anArray |
anArray _ Array new.
anArray at: 1 put: 'hello'; at: 2 put: 'nacho'; at: 3 put: 'pepito';
yourself.

which according to the book should return anArray.

is the at:put: selector different in Cuis?
Thanks in advance
Nacho




-----
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
--
View this message in context: http://forum.world.st/Basic-probably-stupid-question-tp4862695.html
Sent from the Cuis Smalltalk mailing list archive at Nabble.com.




More information about the Cuis mailing list