Just learning and need help with arguments.
Michael Rueger
m.rueger at acm.org
Sun Feb 24 07:14:01 UTC 2002
James Zwiers wrote:
>
> Can anyone tell me how to get multiple arguments on a method, or if it
> is even possible?
Did you try the tutorials at http://squeak.org/documentation/index.html
?
Wolfgang Kreutzer's tutorial might be the right thing for you.
But, to answer your question:
Squeak has only a few different kinds of messages:
unary, no argument, just the message (like "array size")
binary like + - etc where the second object is the argument (like in
"3+4" )
keyword
these are the ones you are asking about
array at: 1
array at: 1 put: 2
Array with: 1 with: 2 with: 3 with: 4
You define the messages in the browser like in the following examples:
at: aKey put: aValue
"do something interesting here"
or
with: arg1 with: arg2
"do something interesting here"
etc.
Michael
More information about the Squeak-dev
mailing list
|