s-news
[Top] [All Lists]

Re: [Thanks!] Question about calling Fortran code with "stop"

To: "Liaw, Andy" <andy_liaw@merck.com>
Subject: Re: [Thanks!] Question about calling Fortran code with "stop"
From: Zhu Wang <zhuw@mail.smu.edu>
Date: Tue, 20 Jul 2004 15:10:11 +0000
Cc: zhuw@mail.smu.edu, s-news@lists.biostat.wustl.edu
In-reply-to: <3A822319EB35174CA3714066D590DCD504AF80AE@usrymx25.merck.com>
References: <3A822319EB35174CA3714066D590DCD504AF80AE@usrymx25.merck.com>
Thanks to Andy Liaw, Ravi Varadhan and Bill Dunlap for the quick
replies. All of replies helped.

Zhu Wang

On Tue, 2004-07-20 at 19:59, Liaw, Andy wrote:
> The short answer is to change `stop' to `return'.  You probably should set a
> flag so you can check the value of `aaa' after the subroutine returns.
> 
> Andy
> 
> > From: Zhu Wang
> > 
> > Dear all,
> > 
> > I am writing an S-Plus (version 6.1) function on Windows to call a
> > Fortran code. The Fortran code has something like below:
> > 
> > if(aaa)then
> > stop
> > 
> > The compiled S-Plus function works fine except that whenever aaa is
> > TRUE, The Fortran subroutine exits AND the S-Plus session is shutdown
> > and I have to restart S-Plus. I just do not like this.
> > 
> > My question is how should I change the Fortran code or S-Plus 
> > code such
> > that the Fortran subroutine exits but my S-Plus session is 
> > still alive.
> > 
> > Thanks,
> > 
> > -- 
> > Zhu Wang
> > 
> > Statistical Science Department
> > Southern Methodist University
> > Dallas, TX 75275-0332
> > 
> > --------------------------------------------------------------------
> > This message was distributed by s-news@lists.biostat.wustl.edu.  To
> > unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> > the BODY of the message:  unsubscribe s-news
> > 
> > 
> 
> 
> ------------------------------------------------------------------------------
> Notice:  This e-mail message, together with any attachments, contains 
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
> Jersey, USA 08889), and/or its affiliates (which may be known outside the 
> United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
> Banyu) that may be confidential, proprietary copyrighted and/or legally 
> privileged. It is intended solely for the use of the individual or entity 
> named on this message.  If you are not the intended recipient, and have 
> received this message in error, please notify us immediately by reply e-mail 
> and then delete it from your system.
> ------------------------------------------------------------------------------



<Prev in Thread] Current Thread [Next in Thread>