diff options
Diffstat (limited to '99bottles.for')
-rw-r--r-- | 99bottles.for | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/99bottles.for b/99bottles.for new file mode 100644 index 0000000..b9b5aec --- /dev/null +++ b/99bottles.for @@ -0,0 +1,17 @@ +C 99 bottles of beer in FORTRAN 77. +C This one is almost an obfu, but valid FORTRAN 77. +C Demonstrated features: character format identifiers, arrays as +C internal files, implied-DO-loops, importance of the blank character, +C rules for continuation lines, substrings, implicit type declaration... +565760C H ARA C T ERM S G ( 4 ) * 1 3 7 +324650WRITE(MSG,'(93H(A,/,A,A,/,A,A,A,TL37,2HA ,/,A,TL62,2HA ,34X,2HA ,2 + 34X,33HGo to the store and buy some more,A),/,136H(I2,'' bottles of + F beer on the wall, '',I2,'' bottles of beer.'',/,''Take one down a + Rnd pass it around, '',I2,'' bottles of beer on the wall.'',/) ) ') +347650WRITE(MSG,MSG(1))MSG(2),MSG(2)(:110),MSG(2)(112:),MSG(1)(:12),MSG( + 11)(1 4: 4 8),M SG(1)(5 0:1 3 6),M SG( 1)(:6 3),M S G(1)(9 6:1 3 6) +650860P R INT MS G ( 1 ) , ( K, K , K -1, K =9 9, 3, - 1) +323450P RI N T M S G ( 2 ) , 2 , 2 , 1 + PR I N TM S G ( 3) , 1 , 1 , 'no more' +023000P R I NT M S G (4 ) , 'No more' , 'no more', 9 9 +543990E N D |