home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!wupost!cs.utexas.edu!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!appserv.Eng.Sun.COM!appserv!khb
- From: khb@chiba.Eng.Sun.COM (Keith Bierman fpgroup)
- Newsgroups: comp.lang.fortran
- Subject: Re: programming style question
- Message-ID: <KHB.92Aug16161904@chiba.Eng.Sun.COM>
- Date: 16 Aug 92 20:19:04 GMT
- References: <1992Aug16.195651.25319@news.Hawaii.Edu> <1992Aug16.221725.6760@ee.ubc.ca>
- Organization: Sun MegaSystems
- Lines: 25
- NNTP-Posting-Host: chiba
- In-reply-to: davem@ee.ubc.ca's message of Sun, 16 Aug 1992 22:17:25 GMT
-
-
- > Is it dangerous or poor practice to assume that the variables
-
- A careful reading of the standard will reveal that this is indeed,
- poor practice.
-
- If you wish to have a variable retain its old value across
- invokations, you must use the
-
- SAVE foo
-
- or the blanket
-
- SAVE
-
- in the function/subroutine you wish to behave in this fashion. Of
- course, putting the variable in COMMON (so long as the COMMON is
- always in scope, typically part of your main program) is equally safe.
-
- This is, in fact, why the SAVE command exists.
- --
- ----------------------------------------------------------------
- Keith H. Bierman keith.bierman@Sun.COM| khb@chiba.Eng.Sun.COM
- SunPro 2550 Garcia MTV 12-33 | (415 336 2648) fax 964 0946
- Mountain View, CA 94043 <speaking for myself, not Sun*> Copyright 1992
-