473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

system call exits the loop

I've got a perl script with a system command, within a for loop, that
calls a FORTRAN program. For one of the iterations of the for loop the
FORTRAN program quits with an error due to bad input. This then exits
the for loop and does not continue the loop, which I would like it to
do, even if the FORTRAN program crashes. How can I "catch" this error
and continue the loop. Do I have to fix the FORTRAN program to exit
more cleanly?

Thanks for any help.

Jul 19 '05 #1
1 2662
Disregard this post, the system call fail does not exit the for loop.
My bad. I was also hung up on the fact that system outputs a 0 for a
failed process.

Bob Helber wrote:
I've got a perl script with a system command, within a for loop, that
calls a FORTRAN program. For one of the iterations of the for loop the
FORTRAN program quits with an error due to bad input. This then exits
the for loop and does not continue the loop, which I would like it to
do, even if the FORTRAN program crashes. How can I "catch" this error
and continue the loop. Do I have to fix the FORTRAN program to exit
more cleanly?

Thanks for any help.


Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Randy Jackson | last post by:
I'm attempting to debug some code that uses the System function. When the function is called, it returns Error 1. Does anyone know what that error might be, or where I can find a list of error...
1
by: Erik Johnson | last post by:
Hi, I am trying to spawn a daemon type program to go off on its own and do some work (asynchoronously) from within an HTTPServer, but I am running into a problem where the web browser (actually...
1
by: David Scott Williams | last post by:
I have a shell script that exits out with either a 0 or 1...and am experiencing a strange phenomenon... somevalue=os.system("/path/to/script") print "somevalue:"+str(somevalue) If my script...
1
by: Randy Harris | last post by:
I've been fighting a problem with A2K for weeks now and am absolutely stumped. I have a procedure that is called from the Activate event of a form. The procedure creates a couple of recordsets,...
4
by: wobbles | last post by:
Hi Everyone, I've spent hours investigating why my Async (one way) call wasn't invoking the method on my server. Basically, if I remove " Console.ReadLine() ", the method DOESN'T get invoked....
10
by: One Handed Man [ OHM ] | last post by:
If this is duplicated, I'm sorry because I cant find the original post I made today Anyway . . Now its my turn to ask a question I want to develop an app which will run in the system tray....
4
by: Tad Marshall | last post by:
Hi, I'm having limited luck getting an ApplicationException to work right in my code. This is VB.NET, VS 2003, Windows XP SP2, .NET Framework 1.1. I thought it would be convenient to take...
3
by: Goofy | last post by:
The 2.0 Framework has a new type called System.Nullable. This allows something to Not exist, basically you can pass 'Nothing' to a method whose parameters as System.Nullable. Im looking at table...
3
by: Brainsludge | last post by:
Hello, I am running WinXP SP2 with Python 2.5.1 and encountered the following issue: I wrote a script that logs into my mail server, and checks for new messages every 20 seconds. When a new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.