home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- 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
- From: dil@mace.cc.purdue.edu (Perry G Ramsey)
- Subject: Re: Uglifier (was Re: Real Programmers)
- Message-ID: <BzErC8.HBp@mentor.cc.purdue.edu>
- Sender: news@mentor.cc.purdue.edu (USENET News)
- Organization: Purdue University, Department of Earth and Atmospheric Sciences
- References: <1992Dec16.164347.21210@craycos.com> <1992Dec17.102911.8075@newssrv.edvz.univie.ac.at>
- Date: Thu, 17 Dec 1992 14:38:31 GMT
- Lines: 33
-
- In article <1992Dec17.102911.8075@newssrv.edvz.univie.ac.at> pm@cc.univie.ac.at (Peter Marksteiner) writes:
- >Here's my favourite ugly program (uglified by hand, not by an automatic
- >uglifier).
- >...
- What's this nonsense?
-
- > IF(DABS(O).LT.1.E-15.AND.Z.GT.0.5) THEN
- > C=137.542
- > OOO0O=C
- > END IF
- >C
-
- That should read
-
-
- IF(DABS(O).LT.1.E-15.AND.Z.GT.0.5) goto 409
- 410 continue
- ...
- (elsewhere in the code)
- 409 C=137.542
- OOO0O=C
- goto 410
-
- This helps clarify the code by not confusing the reader with the details
- of what happens if (DABS(O) happens to be .LT.1.E-15.AND.Z happens to be
- .GT.0.5).
-
- Those writing uglifiers should remember this.
- --
- Perry G. Ramsey Department of Earth and Atmospheric Sciences
- dil@mace.cc.purdue.edu Purdue University, West Lafayette, IN USA
- perryr@purccvm Life is short ...
- N9LFF Don't waste it folding underwear.
-