Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!lll-winken!aunro!alberta!mts.ucs.UAlberta.CA!Al_Dunbar From: userAKDU@mts.ucs.UAlberta.CA (Al Dunbar) Newsgroups: comp.lang.fortran Subject: Re: A Question of Style Message-ID: Date: 23 May 91 03:57:34 GMT References: <12306@uwm.edu> <1991May21.140440.16964@m.cs.uiuc.edu> <1991May21.180713.1602@unixg.ubc.ca> Organization: MTS Univ of Alberta Lines: 33 In article <1991May21.180713.1602@unixg.ubc.ca>, buckland@ucs.ubc.ca (Tony Buckland) writes: >In article <1991May21.140440.16964@m.cs.uiuc.edu> kornkven@m.cs.uiuc.edu (Ed Kornkven) writes: >>burley@mole.gnu.ai.mit.edu (Craig Burley) writes: >>>In article <12306@uwm.edu> jgd@convex.csd.uwm.edu (John G Dobnick) writes: >>> I have recently run into a FORTRAN compiler that exhibits, to my >>> mind, an annoying trait. It complains voiciferously about statement >>> numbers that are defined on statements, but are otherwise unreferenced. >>> * Is this trait good or bad? Desirable or undesirable? >>>It's bad. Undesirable. >>I disagree. Any help I get from a compiler to help me catch mistakes >>is appreciated and I would have to say that labels that are never >>referenced are very likely due to an error ... > > There are a few people around (I'm not one of them, but I will > defend, although not entirely to the death, their right to be > themselves) who put labels on statements just as markers, with > no intention of ever referencing them. The technique can serve > as a way of locating all statements belonging to some class > defined in the programmer's head, or as a way of delineating > program segments, or as a labelling of statements you intend > to reference one day, or as a labelling of drop-through > statements for computed GOTOs. Et cetera. Comment statements are a much more flexible (and readable) way to document code than sticking in a specially coded statement label. Anyway, Murphy's law suggests that eventually your code will be mangled to actually GOTO an unintended destination. -------------------+------------------------------------------- Al Dunbar | Edmonton, Alberta | Disclaimer: "I disclaim disclaimers" CANADA | -------------------+-------------------------------------------