Just learning and need help with arguments.

Duane T Williams duane at cmu.edu
Sun Feb 24 07:23:15 UTC 2002


Open a browser and check out the "Language-Core-Numbers:Number:intervals:*"
methods.  For example, here is a method for executing a block for a range
of numbers.

to: stop do: aBlock
	"Normally compiled in-line, and therefore not overridable.
	Evaluate aBlock for each element of the interval (self to: stop by:
1)."
	| nextValue |
	nextValue _ self.
	[nextValue <= stop]
		whileTrue: [aBlock value: nextValue.
			nextValue _ nextValue + 1]

>Can anyone tell me how to get multiple arguments on a method, or if it is
>even possible?
>
>Thanks,
>
>James Zwiers




More information about the Squeak-dev mailing list