Re: defmethod with multiple parameters



I made a mistake in my first post. I didn't notice that your call to
(set-background IMAGE)
worked correctly. Anyway, I think creating an optional argument will
still solve your problem. Something like this:

(defmethod combine (x y &optional (z 255))
(list x y z))
(combine 1 2 3) --> (1 2 3)
(combine 1 2) --> (1 2 255)

I don't know how to specify both a default value and a type
specification, though. Another possibility is to use (z integer),
accept the default value of z=nil, and add (if (null z) (setf z 255))
to the beginning of the method.

Good luck.

.



Relevant Pages

  • RE: SUMPRODUCT - Count Various criteria in same column (exclude ot
    ... The LEFTfunction returns the leftmost portion of a string, ... number of characters you specify. ... Although my first post said 18, ... "EricB" wrote: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Reflection and an overridden class
    ... but I am not in my first post. ... >using an inherited class ... exclude them by specifying BindingFlags.DeclareOnly ... only 2 binding flags you need to specify is BindingFlags.NonPublic | ...
    (microsoft.public.dotnet.languages.csharp)
  • PHP5 under IIS6
    ... I'm trying to mount PHP5 under a ... which is a very big mistake 'cause I'm specify that I use IIS6. ... en el campo de las ideas" ...
    (php.general)
  • [SLE] Re: USB Pen Drive - Enabling unmounting and other issues
    ... Incomplete text from my first post on this thread: ... Is it also possible for me to give this some permanent location at ... Should I specify that at ... ...
    (SuSE)
  • Re: Setting date/time to send message
    ... Sorry, due to an annoying bug in Entourage, my first post got sent juast as ... Send/Receive and I want to be able to specify a later date/time.) ...
    (microsoft.public.mac.office.entourage)