home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.edu:1402 comp.lang.fortran:3270
- Newsgroups: comp.edu,comp.lang.fortran
- Path: sparky!uunet!gatech!hubcap!mjs
- From: mjs@hubcap.clemson.edu (M. J. Saltzman)
- Subject: Re: Small Language Wanted
- Message-ID: <1992Aug28.225600.7730@hubcap.clemson.edu>
- Keywords: modular programming
- Organization: Clemson University, Clemson SC
- References: <8749@amsaa-cleo.brl.mil> <1992Aug28.161000.6930@newshost.lanl.gov> <1992Aug28.200552.28137@ctr.columbia.edu>
- Distribution: na
- Date: Fri, 28 Aug 1992 22:56:00 GMT
- Lines: 33
-
- In article <1992Aug28.200552.28137@ctr.columbia.edu> shenkin@avogadro.barnard.columbia.edu (Peter S. Shenkin) writes:
- >In article <1992Aug28.161000.6930@newshost.lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes:
- >>
- >>semantically, a WHILE loop *IS* the following:
- >>
- >> 10 IF (cond) THEN !WHILE
- >> ... body of loop ...
- >> GOTO 10
- >> ENDIF !END WHILE
- >>
- >>Proper commentary will elucidate this further, and you should never
- >>use the label as the target of any *other* GOTO.
- >
- >The authors of "Numerical Recipes" observed that it is not the GOTO that
- >is the problem -- it is the label. When you see a GOTO, you know exactly
- >what is supposed to happen. But when you see a label, a branch to it could
- >have come from anywhere. Using GOTOs and labels as carefully as implied
- >by Jim's last comment is one trick to writing clean, structured Fortran.
-
- Reminds me (though I can't place the source) of the toungue-in-cheek
- proposal to add a COMEFROM statement. When it appeared in your code, you
- were to assume that you arrived on a branch from a statement with the
- given label. That reversed the usual problem, since you always knew
- how you could get to the statement you were looking at, but you
- couldn't tell what statement would follow a statement with a label.
- The implications were mind-boggling!
-
-
-
- --
- Matthew Saltzman
- Clemson University Math Sciences
- mjs@clemson.edu
-