home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / fortran / 4792 < prev    next >
Encoding:
Text File  |  1992-12-17  |  1.5 KB  |  45 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!mentor.cc.purdue.edu!mace.cc.purdue.edu!dil
  3. From: dil@mace.cc.purdue.edu (Perry G Ramsey)
  4. Subject: Re: Uglifier (was Re: Real Programmers)
  5. Message-ID: <BzErC8.HBp@mentor.cc.purdue.edu>
  6. Sender: news@mentor.cc.purdue.edu (USENET News)
  7. Organization: Purdue University, Department of Earth and Atmospheric Sciences
  8. References: <1992Dec16.164347.21210@craycos.com> <1992Dec17.102911.8075@newssrv.edvz.univie.ac.at>
  9. Date: Thu, 17 Dec 1992 14:38:31 GMT
  10. Lines: 33
  11.  
  12. In article <1992Dec17.102911.8075@newssrv.edvz.univie.ac.at> pm@cc.univie.ac.at (Peter Marksteiner) writes:
  13. >Here's my favourite ugly program (uglified by hand, not by an automatic
  14. >uglifier).
  15. >...
  16. What's this nonsense?
  17.  
  18. >      IF(DABS(O).LT.1.E-15.AND.Z.GT.0.5) THEN
  19. >          C=137.542
  20. >          OOO0O=C
  21. >     END IF
  22. >C
  23.  
  24. That should read
  25.  
  26.  
  27.        IF(DABS(O).LT.1.E-15.AND.Z.GT.0.5) goto 409
  28. 410    continue
  29. ...
  30. (elsewhere in the code)
  31. 409          C=137.542
  32.           OOO0O=C
  33.           goto 410
  34.  
  35. This helps clarify the code by not confusing the reader with the details
  36. of what happens if (DABS(O) happens to be .LT.1.E-15.AND.Z happens to be
  37. .GT.0.5).
  38.  
  39. Those writing uglifiers should remember this.
  40. -- 
  41. Perry G. Ramsey         Department of Earth and Atmospheric Sciences
  42. dil@mace.cc.purdue.edu  Purdue University, West Lafayette, IN USA
  43. perryr@purccvm          Life is short ...
  44. N9LFF                   Don't waste it folding underwear.
  45.