Re: This does not jive

new topic     » goto parent     » topic index » view thread      » older message » newer message
DonCole said...
said...

Matt

It's not clear what "does not jive." You didn't really say anything here.

By not jive I meant length(junk)=8. drawRoundRect takes 8 arguments is an error.

As you pointed drawRounRect only sees 1 argument.

Yes. You're passing a single sequence. That's 1 argument.

DonCole said...
 junk={WndMain,1}&rect&{5,5} 
 drawRectangle(junk[1],junk[2],junk[3],junk[4],junk[5],junk[6],junk[7],junk[8]) 
 

This would seem fix the problem but a lot of work.

You are saying I have to use call_proc() and call_func().

Wouldn't drawRectangle(junk[1..8])work?

I haven't had time to test it but will.

junk[1..8] is a single sequence with 8 elements. If you pass that as a parameter to a routine, it is a single argument. Yes, you'll need to split it out, separated by commas, if you want the elements to be treated as separate parameters.

call_proc() obviously works differently, since you pass the parameters as a sequence. If what you were trying to do was allowed, there would be no way to ever determine whether the user was passing a sequence as a single parameter or meant to be all of the parameters.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu