From owner-freebsd-questions Fri May 18 16:58: 1 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 3C9D237B424 for ; Fri, 18 May 2001 16:57:58 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 55064 invoked by uid 100); 18 May 2001 23:57:55 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15109.46851.450682.735582@guru.mired.org> Date: Fri, 18 May 2001 18:57:55 -0500 To: Eric Boucher Cc: questions@freebsd.org Subject: Re: Fortran reading exit code: How to do it without... In-Reply-To: <10701758@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Eric Boucher types: > Hi everyone, > > I have just posted a question about exit code integer > in unix and thank to Jason E.Murray and Linh Pham, > this solve my problem. But I want to know something > else: I'm using fortran 77 and I make my code starting > a script. I want to catch that exit code of the script > without having to redirect it in a file and reading > the integer of that file. Because for now, the only > way I know to do it, is to redirect the information of > the exit code in a file, and then I read that file. > But there must be a way to let fortran know the > integer that my script return, like put it directly in > a variable. Does somebody knows how to do it? It depends on which FORTRAN you're using, and how you're starting the shell script. If you're using g77 and the System intrinsic, then the status is the second argument for the subroutine or the value of the function. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message