Hi - in the first case, x, y and z are variables and you are passing their values to the block.
In the second case, the values inside the array #(x y z) are the symbols #x, #y and #z. Try the following:
block valueWithArguments: (Array with: x with: y with: z)
or
block valueWithArguments: {x. y. z.}
The last case is not standard Smalltalk - it's a very convenient syntax sugar on top of Squeak.
Entschuldigung, aber ich habe fast alles mein Deutsch vergessen.
- Francisco
On Tue, Jul 5, 2011 at 11:11 PM, R. Baumann baumann-garbsen@t-online.dewrote:
Definition:
block := [:a :b :c | a + b + c]. x := 1. y := 2. z := 3.
Auswertung:
block value: x value: y value: z --> 6
Aber:
block valueWithArguments: #(x y z) --> Fehlermeldung
Ist das beabsichtigt oder ein "Bug"?
Mit Dank für kompetente Ausdkunft
R. Baumann
-- View this message in context: http://forum.world.st/Frage-zu-block-valueWithArguments-in-Etoys-4-und-Squea... Sent from the Deutsch (German) mailing list archive at Nabble.com.