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?
|>
|> (At least there aren't many codes twiddling 'sense lights' anymore. :-)
|>
|> Walt
|> --
|> Walt Spector
|> (wws@renaissance.cray.com)
|> Sunnyvale, California
|> _._ _._ _.... _. ._.
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?
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.