Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Mykola_M_
Beginner
54 Views

How to make a general return from the code without stop

Jump to solution

Hallo all experts,

for my code written in fortran also the web-service is developed. The problem is that any stop-command (if error appears) kills the web-service. What I need now is to replace all my "stops" by the fortran-command which makes exit (say, with flag), but not terminates the head-subroutine. I believe that the command like that is already exists. Otherwise, I'm forced to write the set of the commands for returning to the head-subroutine. The point of such return is not clear.

With thanks,

Mykola.

Tags (1)
0 Kudos
1 Solution
jimdempseyatthecove
Black Belt
54 Views

Is your application multi-threaded?
Does your code reside in a DLL (or shared library)?

The cleanest way is for all (most) of your subroutines and functions return a status. You define the status values, and then if any CALL/function returns an error status, you propagate it up the returns.

Lahey has a Fortran for .NET that supports: try/catch/finally/throw

Modifying your code for that, is on the order of modifying your code to pass a STATUS variable.

Jim Dempsey

View solution in original post

1 Reply
jimdempseyatthecove
Black Belt
55 Views

Is your application multi-threaded?
Does your code reside in a DLL (or shared library)?

The cleanest way is for all (most) of your subroutines and functions return a status. You define the status values, and then if any CALL/function returns an error status, you propagate it up the returns.

Lahey has a Fortran for .NET that supports: try/catch/finally/throw

Modifying your code for that, is on the order of modifying your code to pass a STATUS variable.

Jim Dempsey

View solution in original post

Reply