Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.fortran Subject: Re: Is this a "feature"? Message-ID: <5940@goanna.cs.rmit.oz.au> Date: 24 May 91 03:46:27 GMT References: <1991May23.160841.402@ac.dal.ca> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 24 In article <1991May23.160841.402@ac.dal.ca>, scrutton@ac.dal.ca writes: > I'd like to find out if the SAVE statement existed in FORTRAN IV (66). No. > I've come across some old (stylistically) code which doesn't use the > statement and depends on static allocation. Every compiler I've tried > will let you get away with referencing local variables assigned in > previous calls to that routine so it's either a standard `feature' or > part of the standard. It was quite common, but it has _never_ been portable. I had some remarkably painful experiences trying to convert code that did that kind of thing. I'd been programming in Fortran for about 5 years before I met a compiler where this kind of botchery "worked". When Fortran 77 added the SAVE statement it became straightforward to fix old broken shockingly designed code of this sort. > I've also run across a DECODE statement which appears to be a precursor > to the (what's it called...) I/O using character variables as file units. > Is this yet another 66ism? No. It was quite a common extension, but not universal. -- I rejoiced that at least So-and-So could spell "hierarchical", but the _real_ explanation was that he couldn't spell "heir". -me