|
From: | Paolo Bonzini |
Subject: | Re: [Help-smalltalk] Re: GST crashes with the following code |
Date: | Sat, 31 May 2008 19:16:42 +0200 |
User-agent: | Thunderbird 2.0.0.14 (Macintosh/20080421) |
You want "{x. y} printNl" instead of #(x y).Hi, may I ask what the braces do there? Are there making some kind of block so that printNl effects both of them?
The #(...) syntax is only for constant arrays. Non-constant arrays are created with the "tuple syntax" {x. y} (each element is separated by a period.
I should create an array of x and y because, in my actual code, I am passing it to a method which take an array as argument. I didn't understand why it gives "stdin:6: expected true, false or nil" error.
Within constant arrays the only symbolic variables that are allowed are true, false and nil.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |