home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!ux1.cso.uiuc.edu!moe.ksu.ksu.edu!mccall!mccall!tp
- Newsgroups: comp.os.vms
- Subject: Re: Recursion in FORTRAN
- Message-ID: <1993Jan22.085253@mccall.com>
- From: tp@mccall.com (Terry Poot)
- Date: Fri, 22 Jan 1993 08:52:52 CST
- Reply-To: tp@mccall.com (Terry Poot)
- References: <1jj8enINNqik@gap.caltech.edu> <1993Jan20.180757.2587@pony.Ingres.COM> <1993Jan21.195804.6787@dbased.nuo.dec.com>
- Organization: The McCall Pattern Co., Manhattan, KS, USA
- Nntp-Posting-Host: mis1
- Nntp-Posting-User: tp
- Lines: 36
-
-
- In article <1993Jan21.195804.6787@dbased.nuo.dec.com>, lionel@quark.enet.dec.com
- (Steve Lionel) writes:
- >Relax. The default behavior hasn't changed. The compiler sort of gives you
- >a free "SAVE" if it can't determine that you always store a variable before
- >using it. But if you use /RECURSIVE, then variables not explicitly SAVEd
- >won't be. Also, /RECURSIVE will eliminate guaranteed initialization to zero;
- >I've heard one customer consider this a feature, so as to ferret out hidden
- >bugs.
-
- Thanks, I was worried. I've also got code that counts on guaranteed
- initialization. I hadn't thought of that. So as long as I don't use /RECURSIVE,
- I should be OK, right?
-
- >However, if you haven't SAVEd a variable, and the compiler can tell that you
- >definitely use it before storing it, it will give you a warning.
-
- Nice.
-
- >Now what I said about SAVE not meaning "static" is true, though on VAX, at
- >least, it does force static allocation, even if you use /RECURSIVE. But the
- >standard says you should use SAVE if you want the value saved, so put it in
- >if you mean that - it'll prevent possible surprises in the future and also
- >>makes
- >the intent clearer to someone reading the code.
-
- I always do, but I didn't write most of this stuff. Given sufficient time it'll
- all be rewritten in C anyway, Fortran's a poor choice for this application (it
- really needs dynamic memory), I just don't want it all to fall apart in the mean
- time.
-
- Thanks for the reassurances!
- --
- Terry Poot <tp@mccall.com> The McCall Pattern Company
- (uucp: ...!rutgers!depot!mccall!tp) 615 McCall Road
- (800)255-2762, in KS (913)776-4041 Manhattan, KS 66502, USA
-