Page 1 of 1

How to break out of called program from within subroutine?

Posted: Thu May 07, 2026 11:13 am
by paues
Is there some way in the setup below to break out of child.prg from the subroutine childsub and return to parent.prg? The desired solution would show the dialog box "after child" but none of the other two.

parent.prg

Code: Select all

exec .\child.prg @uiprompt("after child")
child.prg

Code: Select all

call childsub @uiprompt("after childsub") subroutine childsub ' Break out of child.prg here @uiprompt("after breakout") endsub

Re: How to break out of called program from within subroutine?

Posted: Thu May 07, 2026 2:16 pm
by EViews Gareth
I believe return will exit out of a subroutine, if in one, and exit out of a program otherwise. So, exiting out of a program whilst in a subroutine I think is not possible in one go.