exit pb

Jan Schenkel janschenkel at yahoo.com
Fri Sep 6 04:36:01 EDT 2002

--- Sylvain_Le_Gourriérec
<sylvain.legourrierec at son-video.com> wrote:
> sorry! 
> I made a mistake: it is just the opposite :
> [snip]
> why the do command is not executed?
> thanks

Hi Sylvain,

Actually, the 'do' command _is_ executed, but it
doesn't cause myHandler to exit.
Look at it this way: when you execute a 'do' command,
the statements in the do are wrapped as a sub-routine.
Sub-routines cannot exit the routines that call them.
You _can_ do it if you change the statement to:
  do "exit to top"
but that will end all the handlers in the call chain.

Hope this cleared things up a bit,

Jan Schenkel.

"As we grow older, we grow both wiser and more foolish
at the same time."  (De Rochefoucald)

Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes

More information about the Use-livecode mailing list