Question: interrogating a method's arguments

Richard A. O'Keefe ok at cs.otago.ac.nz
Tue May 20 22:30:49 UTC 2003


	>Of course, back comes ANSI 3.4.1:  method parameters are constant
	>bindings, and there is no legal way to change them.
	
	Actually, I want to #collect:  the arguments array.
	
	>if such a method exists, shouldn't it have ONE argument, an array, in the first place?
	
	Don't ask me; I am trying to polish up my ANSI Duration
	implementation, the method is:
	
		Duration class>>#days:hours:minutes:seconds:seconds
	
5.8.3 <Duration factory>
5.8.3.1 days:hours:minutes:seconds:

    "Duration class >>"
    days: days hours: hours minutes: minutes seconds: seconds
        ^self seconds: ((days * 24 + hours) * 60 + minutes) * 60 + seconds

Unless I have completely misunderstood the text of 5.8.3.1.
It seems clear from the text that positive arguments make the resulting
duration longer, negative ones make the resulting duration shorter, and
there is no _interaction_ between the signs of the arguments as such.

What's to collect?



More information about the Squeak-dev mailing list