X-NEWS: spcvxb alt.folklore.computers: 2621Relay-Version: VMS News - V6.0 10/3/90 VAX/VMS V5.3; site spcvxb.spc.edu Path: spcvxb.spc.edu!njin!rutgers!usc!samsung!uunet!mcsun!ukc!edcastle!ercm20 Newsgroups: alt.folklore.computers Subject: Re: Most perverse fortran statement contenst Message-ID: <5502@castle.ed.ac.uk> From: ercm20@castle.ed.ac.uk (Sam Wilson) Date: 2 Aug 90 16:59:11 GMT References: <1990Jul30.180231.22710@virtech.uucp> Organization: Edinburgh University Computing Service Keywords: No reserved words Lines: 37 In article <1990Jul30.180231.22710@virtech.uucp> jje@virtech.uucp (Jeremy J. Epstein) writes: >Alright folks, here's a new one. FORTRAN doesn't have ... > [ text deleted ] >This allows for many disgusting instructions, such as: > [ more text deleted ] >There are many others...let's see some of the most demented around! Here is program rambo, obtained from one Brian J Pendleton of the Physics Department, University of Edinburgh and reprinted with no permission at all (sorry Brian!). The trick is to predict the output without actually running it. I managed that once but now I can't see for the life of me why it does what it does. Sam Wilson ---------- program rambo C Courtesy of Brian Pendleton, Physics Department, Edinburgh C rambo is valid fortran 77 real if integer integer if real ,end character*7 stop dimension equivalence (if 7, y goto 100) datay goto 100/-100/ do 20 i = 1.20 if 7 = 6 then 5 = 4 20 if x = y goto 100 stop dimension = '(f16.6)' then call go to write =20 else format = 7.2 / do 20 i end = 6 100 read = if x + else format - then 5 + do 20 i write (end, stop dimension) read end