home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / edu / 1397 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  1.8 KB

  1. Xref: sparky comp.edu:1397 comp.lang.fortran:3268
  2. Newsgroups: comp.edu,comp.lang.fortran
  3. Path: sparky!uunet!elroy.jpl.nasa.gov!usc!sol.ctr.columbia.edu!avogadro.barnard.columbia.edu!shenkin
  4. From: shenkin@avogadro.barnard.columbia.edu (Peter S. Shenkin)
  5. Subject: Re: Small Language Wanted
  6. Organization: Dept. of Chem, Barnard College, Columbia U, New York
  7. References: <1992Aug25.095623.18808@news.Hawaii.Edu> <8749@amsaa-cleo.brl.mil> <1992Aug28.161000.6930@newshost.lanl.gov>
  8. Message-ID: <1992Aug28.200552.28137@ctr.columbia.edu>
  9. Distribution: na
  10. Sender: news@ctr.columbia.edu (The Daily Lose)
  11. Keywords: modular programming
  12. Date: Fri, 28 Aug 1992 20:05:52 GMT
  13. X-Posted-From: avogadro.barnard.columbia.edu
  14. X-Posted-Through: sol.ctr.columbia.edu
  15. Lines: 24
  16.  
  17. In article <1992Aug28.161000.6930@newshost.lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes:
  18. >
  19. >semantically, a WHILE loop *IS* the following:
  20. >
  21. >   10 IF (cond) THEN              !WHILE
  22. >         ... body of loop ...
  23. >      GOTO 10
  24. >      ENDIF                       !END WHILE
  25. >
  26. >Proper commentary will elucidate this further, and you should never
  27. >use the label as the target of any *other* GOTO.  
  28.  
  29. The authors of "Numerical Recipes" observed that it is not the GOTO that
  30. is the problem -- it is the label.  When you see a GOTO, you know exactly 
  31. what is supposed to happen.  But when you see a label, a branch to it could 
  32. have come from anywhere.  Using GOTOs and labels as carefully as implied 
  33. by Jim's last comment is one trick to writing clean, structured Fortran.
  34.  
  35.     -P.
  36. -- 
  37. ************************f*u*cn*rd*ths*u*cn*gt*a*gd*jb*************************
  38. Peter S. Shenkin, Department of Chemistry, Barnard College, New York, NY 10027
  39. (212)854-1418    shenkin@avogadro.barnard.columbia.edu   shenkin@cunixf.BITNET
  40. ******************** The singular of "media" is "medium". ********************
  41.