Skip to content

Instantly share code, notes, and snippets.

@dbremner
Created July 18, 2021 21:46
Show Gist options
  • Save dbremner/9d359a656eec8bbf7c15557a518fefb5 to your computer and use it in GitHub Desktop.
Save dbremner/9d359a656eec8bbf7c15557a518fefb5 to your computer and use it in GitHub Desktop.
Obfuscated Fortran 77 from Adam Rosenberg's A Description of One Programmer’s Programming Style Revisited
integer go to, do 100 if, return
character*12 read
logical go to if
real logical(30)
data read / 12h(1x,i5,f8.1) /
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment