home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!usenet
- From: r-larkin@uiuc.edu (Ron Larkin)
- Subject: Re: Why CALL EXIT? (was Re: Question for C ==> Fortran)
- References: <1992Jul28.075514.28683@debbie.cc.nctu.edu.tw> <1992Jul29.134901.1@slacvx.slac.stanford.edu> <1992Jul29.204115.3917@walter.cray.com>
- Message-ID: <Bs7I3H.Bu2@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: Illinois Natural History Survey
- Date: Thu, 30 Jul 1992 14:40:27 GMT
- Lines: 39
-
- In article <1992Jul29.204115.3917@walter.cray.com> wws@craywr.cray.com (Walter
- Spector) writes:
- >
- >In article <1992Jul29.134901.1@slacvx.slac.stanford.edu>,
- fairfield@slacvx.slac.stanford.edu writes:
- >|> [a bunch of stuff, then...]
- >|> CALL EXIT
- >|> END
- >|>
- >|> The "CALL EXIT" at the bottom is optional (more-or-less). A "STOP"
- statement
- >|> would do just as well.
- >
- >This is something I have never understood in almost 20 years of Fortran
- >programming. Why do so many people use the non-standard CALL EXIT
- >instead of the standardized-for-over-25-years STOP statement?
- >Is/was there magic associated with it on some arcane systems?
-
- One possible reason is that one may then later write one's own SUBROUTINE
- EXIT that does some clean-up work or that terminates the program in a certain
- way. In this case, though, I would prefer to see the programmer CALL
- CLEAN_UP_AND_EXIT (or some other non-confusable name), that does whatever if
- any clean-up is required and then STOPs or CALLs EXIT.
- If environment-specific code (even the rather generic CALL EXIT) is
- sequestered within a separate module, it's easier to change later (e.g. to
- STOP) or to port to another environment.
-
- >Walt
- >--
- >Walt Spector
- >(wws@renaissance.cray.com)
- >Sunnyvale, California
- >_._ _._ _.... _. ._.
-
- Ron
-
- Ronald P. Larkin, Illinois Natural History Survey
- 607 E. Peabody Drive, Champaign, IL 61820 USA
- r-larkin@uiuc.edu (Ron Larkin)
-