Language KimL
| Date: | 06/13/12 |
| Author: | Marinus Oosters |
| URL: | n/a |
| Comments: | 0 |
| Info: | http://esolangs.org/wiki/KimL |
| Score: |
var.decl int bottles = 99
ctrl.goto sing
print_bottles:
ctrl.goto print_99 if bottles < 0
ctrl.goto print_nomore if bottles = 0
io.out bottles
ctrl.goto print_bottle
print_99:
io.out "99"
ctrl.goto print_bottle
print_nomore:
io.out "No more"
print_bottle:
io.out " bottle"
ctrl.goto skip_plural if bottles = 1
io.out "s"
skip_plural:
ctrl.return
third_line:
ctrl.goto store if bottles = 0
io.out "Take one down and pass it around,\n"
ctrl.return
store:
io.out "Go to the store and buy some more,\n"
ctrl.return
sing_verse:
ctrl.call print_bottles
io.out " of beer on the wall,\n"
ctrl.call print_bottles
io.out " of beer,\n"
ctrl.call third_line
var.set bottles = bottles - 1
ctrl.call print_bottles
io.out " of beer on the wall.\n\n"
ctrl.return
sing:
ctrl.call sing_verse
ctrl.goto sing if bottles >= 0
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