How to break out of called program from within subroutine?

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

paues
Posts: 205
Joined: Fri Apr 15, 2011 7:16 am
Location: Stockholm, Sweden

How to break out of called program from within subroutine?

Postby paues » Thu May 07, 2026 11:13 am

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13591
Joined: Tue Sep 16, 2008 5:38 pm

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

Postby EViews Gareth » Thu May 07, 2026 2:16 pm

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.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests