473,549 Members | 2,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2678
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
2351
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 codes for the function? Any help is most appreciated. -- Randy Jackson http://fourcolorexplosion.com
1
2692
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 a Perl LWP program) still seems to be waiting for more input until the child that is forked in the server finishes (granchild, actually). I don't...
1
3435
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 exits with 0, somevalue is 0 ....if it exits with 1, somevalue is 256
1
1373
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, then iterates through them with a While loop. Inside the loop another recordset is created then closed. The problem is that the procedure exits...
4
1724
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. Can anyone tell me why? Does the call require a pause? (ErrorInformation is a serializable struct - for those who are
10
3660
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. How can I do this?
4
2111
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 advantage of exception handling to deal with the case of the user clicking the Cancel button while a long operation was running. So, I declared a...
3
2012
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 adapters ; you know those clever little things which allow you to contrsuct methods for manipulating data use this. So a method might be declared...
3
3603
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 message is found, it displays a Windows tool tip and prints a line to console indicating a new message.
0
7956
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7808
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6040
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5087
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.