Language SPITBOL
(Exact "official" lyrics, incl case)
| Date: | 08/14/07 |
| Author: | Gordon E. Peterson II |
| URL: | http://personal.terabites.com |
| Comments: | 0 |
| Info: | http://www.snobol4.com |
| Score: |
cr = char(13) char(10); n = 99; ob = " of beer"; otw = " on the wall" more output = (nobb = (gt(n,0) n,"No more") " bottle" (eq(n,1),"s") ob) otw + ", " replace(nobb,"N","n") "." cr + (gt(n,0) "Take one down and pass it around", + "Go to the store and buy some more" ?(n = 100)) ", " ?(n = n - 1) + (gt(n,0) n, "no more") " bottle" (eq(n,1),"s") ob otw "." output = lt(n,99) cr :s(more) end
Download Source | Write Comment
Alternative Versions
| Version | Author | Date | Comments | Rate |
|---|---|---|---|---|
| 1 | D.H. | 04/20/05 | 1 | |
| this one uses pattern matching | Gordon E. Peterson II | 08/14/07 | 0 |
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments