--- In [email protected], Alan Martin <[EMAIL PROTECTED]> wrote:
> 
> So: quit(win.debug("Not true so we quit")++"different")
> executes the win.debug and only "different" is returned.
> 
> I didn't know we can do that.
> Another interesting trick which only Sean knows about :)

You may use this syntax even for functions which doesn't return just
null, like do() which is almost omnipotent, utilizing select(...,0).
I'm almost sure we can use quit(...) for any command, even with
multiple commands. The only obstacle would be the line-length limit of
530.

However, this wasn't the reason I posted this simple-minded one. I was
well aware that you didn't mean just this simple example, and it would
require to rewrite a bunch of scripts unless already had done it. The
reason was mainly that I always felt reluctant/unfinished about, so
tried to avoid, using 'quit' in the middle of if()do-endif and
for()-endfor, and 'break' in if()do-endif during for()-endfor.

> That would fix the small examples I showed, but I'm looking for
> a more general solution. In real cases I sometimes want to do more
> than just debug before the conditional quit.
> In the final product I want to show a message box, not use debug,
> plus I may need to calculate a suitable return value for the Quit.

If Bruce can readily manage the situations, then it'll be fine. No
need for further considerations. If not, however, I think it'll be
sufficient only to introduce a switch/option to turn on/off the error
messages in cases. I'm pretty sure that you don't need this error
message yourself to remind of the difference between if() and
if()do-endif. It'll be just for the beginners (the option should be on
by default, of course). This was the reason I posted the simple-minded
one.

Sean






------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to