Language Forth
(ANS standard)
| Date: | 07/12/05 |
| Author: | Ian Osgood |
| URL: | n/a |
| Comments: | 8 |
| Info: | http://www.forth.org/ |
| Score: |
\ ANS Forth, well-factored
:noname dup . ." bottles" ;
:noname ." 1 bottle" ;
:noname ." no more bottles" ;
create bottles , , ,
: .bottles dup 2 min cells bottles + @ execute ;
: .beer .bottles ." of beer" ;
: .wall .beer ." on the wall" ;
: .take ." Take one down and pass it around" ;
: .verse .wall ." , " .beer ." ." cr
1- .take ." , " .wall ." ." cr ;
: verses begin cr .verse ?dup 0= until ;
99 verses
Download Source | Write Comment
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
verses is ( n -- )
All the other words are ( n -- n )
Now, this isn't a weird language- Befunge, False, Brainf*ck, and Malbolge are weird ones. >