Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

How to STOP early

CharlieG
Beginner
455 Views
I have an application with a .NET 2.0 UI which calls a Fortran .dll to do the heavy lifting. Normally when the Fortran is finished control returns to the UI and the results are displayed. In some cases I'd like to terminate the Fortan early, say when I discover an error and need to return for the user to correct. Unfortunately if I use STOP, CALL ABORT, or CALL EXIT the command shuts down everything including the UI. How can I terminate the Fortran .dll without killing the UI?
0 Kudos
1 Reply
Steven_L_Intel1
Employee
455 Views
The best way is to return from the DLL routine. I'm not sure if it's possible to raise an exception that can get handled by the caller. Typically, one would structure the Fortran so that at each step, a status is passed back and if a failure is seen that status is returned up the chain.
0 Kudos
Reply