chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] is case-lambda expensive?


From: Matthew David Parker
Subject: Re: [Chicken-users] is case-lambda expensive?
Date: Wed, 24 May 2006 13:33:52 -0400 (EDT)



> Ex: (w/ csi)
>
> #;1> (define (msdl.pixel x y rgb alpha #!optional (img 0)) 'foo)
> #;2> (procedure-information msdl.pixel)
> (msdl.pixel x y rgb alpha #!optional (img 0))
> #;3> (msdl.pixel 3)
> Error: too few arguments - received 1 but expected 4: #<procedure
> (msdl.pixel x y rgb alpha #!optional (img 0))>
>
>          Call history:
>
>          <eval>          (msdl.pixel 3)  <--
>

That is just want I want; for it to throw an error and then print out the
info, but I have to define and compile my functions in csc first, so I get
the weird errors will all the numbers after them.  Is there some way to
clean up the debug output from functions that come from csc?  Is it better
to use the #!optional thing instead of case-lambda? (I have to use one of
those for the img argument at least).

Matt


> And (w/ csc)
>
> Error: too few arguments - received 1 but expected 4: #<procedure
> (msdl.pixel x3 y4 rgb5 alpha6 . g27)>
>
>          Call history:
>
>          t1.scm: 3    msdl.pixel                 <--
>
> >
> > Thanks,
> > Matt
> >
> > (btw, "msdl" is just a temporary name, as there is already an
> > "msdl" for
> > SDL)
> >
> >
> > _______________________________________________
> > Chicken-users mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/chicken-users
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]