Re: Condtional parameters in handler calls

2012-07-18 Thread Peter Haworth
OK, that makes my head spin just looking at it! Pete lcSQL Software On Tue, Jul 17, 2012 at 6:52 PM, J. Landman Gay wrote: > On 7/17/12 7:54 PM, Peter Haworth wrote: > >> Thanks everyone for the alternative ways of doing this. I think Mike's >> comes closest to what I wa

Re: Condtional parameters in handler calls

2012-07-17 Thread J. Landman Gay
On 7/17/12 7:54 PM, Peter Haworth wrote: Thanks everyone for the alternative ways of doing this. I think Mike's comes closest to what I was hoping for. It was pretty much an academic question. I still think it would be nice to be able to do it though. Not exactly what you're looking for, but

Re: Condtional parameters in handler calls

2012-07-17 Thread Peter Haworth
Thanks everyone for the alternative ways of doing this. I think Mike's comes closest to what I was hoping for. It was pretty much an academic question. I still think it would be nice to be able to do it though. Pete lcSQL Software On Tue, Jul 17, 2012 at 4:35 PM, Mike B

Re: Condtional parameters in handler calls

2012-07-17 Thread Dar Scott
One should remember that this evaluates both parameter options. For constants, this is not a problem but for terminating recursive functions, it can be fatal. The debugDo version might not be worth the work, but might be fun to talk about. I often use 'get' in 'if', keeping the whole 'if' as

Re: Condtional parameters in handler calls

2012-07-17 Thread Mike Bonner
How about something like this? command myCommand parm1,parm2,parm3 put parm1 && parm2 && parm3 end myCommand function myFunc parm1,parm2,pConditional if value(pConditional) then return parm1 else return parm2 end if end myFunc on mouseup myCommand 14,myFunc(3,22,"parm1

Re: Condtional parameters in handler calls

2012-07-17 Thread Dick Kriesel
Hi, Pete. You can wrap your "if" in a function, so any caller can have just one line. myCommand parm1,iff(,,),parm3 function iff pBoolean,pTrueValue,pFalseValue if pBoolean then return pTrueValue else return pFalseValue end if end iff -- Dick On Jul 17, 2012, at 4:18 PM,

Re: Condtional parameters in handler calls

2012-07-17 Thread Kee Nethery
if then put into parm2 else put into parm2 end if myCommand parm1, parm2, parm3 I don't think it is possible and ... I think you are heading towards the single line Perl programming contest where they see who can write a single line of Perl that does something amazing and ca

Condtional parameters in handler calls

2012-07-17 Thread Peter Haworth
I'm pretty sure this is not possible but it would be very cool if a parameter to a command could be a conditiion something like: myCommand parm1,if then else ,parm3 I've tried every which way to do that but always get compile errors. Not possible, right? Pete lcSQL Software