|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Other Programming Languages > Smalltalk - assigning values to a Set using a loop |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|