home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / fortran / 2883 < prev    next >
Encoding:
Text File  |  1992-07-30  |  2.1 KB  |  46 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!mcsun!news.funet.fi!funic!siili
  3. From: siili@sumppu.fmi.fi (Tero Siili)
  4. Subject: Re: Why CALL EXIT? (was Re: Question for C ==> Fortran)
  5. Message-ID: <1992Jul30.153535.21650@nic.funet.fi>
  6. Originator: siili@sumppu.fmi.fi
  7. Sender: usenet@nic.funet.fi
  8. Nntp-Posting-Host: sumppu.fmi.fi
  9. Organization: Finnish Meteorological Institute
  10. References: <1992Jul28.075514.28683@debbie.cc.nctu.edu.tw> <1992Jul29.134901.1@slacvx.slac.stanford.edu> <1992Jul29.204115.3917@walter.cray.com>
  11. Date: Thu, 30 Jul 92 15:35:35 GMT
  12. Lines: 32
  13.  
  14.  
  15. In article <1992Jul29.204115.3917@walter.cray.com>, wws@craywr.cray.com (Walter Spector) writes:
  16. |> 
  17. |> In article <1992Jul29.134901.1@slacvx.slac.stanford.edu>, fairfield@slacvx.slac.stanford.edu writes:
  18. |> |> [a bunch of stuff, then...]
  19. |> |>         CALL EXIT
  20. |> |>         END
  21. |> |>
  22. |> |> The "CALL EXIT" at the bottom is optional (more-or-less). A "STOP" statement
  23. |> |> would do just as well.
  24. |> 
  25. |> This is something I have never understood in almost 20 years of Fortran
  26. |> programming.  Why do so many people use the non-standard CALL EXIT
  27. |> instead of the standardized-for-over-25-years STOP statement?
  28. |> Is/was there magic associated with it on some arcane systems?
  29. |> 
  30. |> (At least there aren't many codes twiddling 'sense lights' anymore. :-)
  31. |> 
  32. |> Walt
  33. |> -- 
  34. |> Walt Spector
  35. |> (wws@renaissance.cray.com)
  36. |> Sunnyvale, California
  37. |> _._ _._ _.... _. ._.
  38.  
  39. I use CALL EXIT(rc) on SGi, since rc is a return code to the operating system.  I often write tools in fortran, since I have not bothered to learn C (why change a tool, if the one you use works?) and then use several of those tools from shell scripts.  I have not checked, but does STOP create an anomalous return code for the OS?
  40.  
  41. On SGi EXIT is, I believe, an INTRINSIC subroutine and one good habit (not invented by me) would be to define EXIT with INTRINSIC statement; then if the code is ported to an environment/compiler, which does not have this (in)famous subroutine, the compiler would give warnings.
  42.  
  43. Tero Siili
  44. Finnish Meteorological Institute
  45. Tero.Siili@fmi.fi
  46.