home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!wupost!gumby!destroyer!ubc-cs!fs1.ee.ubc.ca!davem
- From: davem@ee.ubc.ca (david michelson)
- Subject: Re: programming style question
- Message-ID: <1992Aug17.174516.18372@ee.ubc.ca>
- Organization: University of BC, Electrical Engineering
- References: <1992Aug16.221725.6760@ee.ubc.ca> <KHB.92Aug16161904@chiba.Eng.Sun.COM> <1992Aug17.170254.17530@ee.ubc.ca>
- Date: Mon, 17 Aug 1992 17:45:16 GMT
- Lines: 23
-
- With the keyword "SAVE" in hand, I rechecked some of my Fortran and
- numerical computing books. This quote from "Numerical Recipes: The Art
- of Scientific Computing" caught my eye:
-
- "The Fortran 77 standard provides that variables internal to a subroutine
- are *not* guaranteed to be saved between successive calls to that
- subroutine unless the variable is declared global in a SAVE statement.
- (This allows stack-oriented implementations.)
-
- If this part of the standard were "enforced", a large fraction of all
- programs written by all living programmers would immediately cease to
- function. Only a few compilers *dare* to implement this part of the
- standard, therefore."
-
- [...followed by notes about the *correct* way of handling things --
- according to the ANSI standard...]
-
-
- (pp 13--14) "Some habits and departures from ANSI Standard"
-
- Dave Michelson "davem@ee.ubc.ca"
-
-
-