home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / fortran / 3068 < prev    next >
Encoding:
Text File  |  1992-08-17  |  1.3 KB  |  34 lines

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