
April 20th, 2006, 04:23 PM
|
 |
Getting better 1 line @ a time
|
|
Join Date: Feb 2004
Location: Sheffield
|
|
|
Smalltalk - assigning values to a Set using a loop
Hi all.
I am trying to assign the numbers 1 through to 20 to a Set, this is the code so far
Code:
|aSet i|
aSet := Set new.
i := 1.
[ i = aUpperBound] whileFalse: [i := i+1. aSet add:i].
But it says that it cannot find the Set (aSet), what am I doing wrong?
Jake
|