Why I don't like Fortran

by Jim Chapman
[ Home | Where we live | Jim | Isabel | James | Edward | Nicholas ]

One sunny day in 1992, I found this lurking in the middle of a 100,000-line Fortran program that I was trying todebug:

          if ((mode.eq.1.or.mode.eq.5).and.(a.gt.1.or.b.gt.0).or.
     *       ((mode.eq.2.or.mode.eq.6).and.
     *         a.gt.1.and.a.lt.n_shifts+1.and.b.ne.0).or.
     *       mode.eq.4.and.(a.gt.1.or.b.gt.2).or.
     *        a.gt.n_shifts.and.b.gt.18) goto 390

I had a very nasty hangover, and this code did not help matters.