Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!rpi!sci.ccny.cuny.edu!phri!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: Fortran 77 Style Guide (long, REPOST) Message-ID: <62893@lanl.gov> Date: 13 Sep 90 20:33:17 GMT References: Distribution: na Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 29 From article , by maine@elxsi.dfrf.nasa.gov (Richard Maine): > On 10 Sep 90 14:16:39 GMT, mac@harris.cis.ksu.edu (Myron A. Calhoun) said: > > Myron> Unfortunately, re-used FORMATs cause programs to "break" during > Myron> maintenance. The scenario is that someone modifies a FORMAT > Myron> and ONE of its associated I/O statements but doesn't notice > Myron> there are others. > > Myron> Voila! Instant "broken" program. > > Hmmm. I'd been tempted to make a very simillar point, but on the opposite > side. [...] I agree with both sides. The reason I made the recommendation which started this thread was to address this very issue. So I'll make the recommendation again and point out the relevance: The format specification for an I/O statement should be included _within_ the I/O statement itself, unless the same format is used by several different I/O statements. So, if a format only applies to one I/O statement, it is _within_ that statement. If it applies to more than one, it is specified separately. So, the "Myron" problem cannot arise because if someone modifies a FORMAT statement and only ONE of the associated I/O requests, he has violated the convention: a _separate_ FORMAT _always_ applies to more than one I/O request. The user should have looked for all of them. J. Giles