Richard Harter’s World
Site map
August 2009
Humor
Mathcomp
email

The sickness unto death

Dave Seaman posted the following “fortran” code on usenet with the claim that it compiles and executes correctly, albeit with compiler warnings. I can’t imagine why the compiler would complain.

      integer go to,do 100 if,return
      real read(4)
      logical go to if
      real logical(30)
      data read/4h(1x,,3hi5,,4hf8.1,1h)/
      data go to,do 100 if,if 100 do/2,1,30/
      assign 100 to if go to
      do 100 if=do 100 if,if 100 do 
      return=if 
      logical(if)=return
      go to if=if-go to*(if/go to).eq.do 100 if 
      if(go to if) go to if go to 
      call call(logical,return) 
  100 continue
      print read, (if,logical(if),if=do 100 if,if 100 do) 
      stop
      end 
      subroutine call( integer,real ) 
      integer real
      real integer(real)
      common(if)=if*if
      integer(real)=common(real)
      return
      end 


This page was last updated August 1, 2009.

Richard Harter’s World
Site map
August 2009
Humor
Mathcomp
email