Language ADL
| Date: | 04/20/05 |
| Author: | Ross Cunniff |
| URL: | n/a |
| Comments: | 0 |
| Info: | n/a |
| Score: |
ADL is Adventure Definition Language
{ This version of beer.adl is the normal procedural one which has }
{ no user interaction, and only prints out the song. Quite boring, }
{ really. Ross Cunniff, 1997 cunniff@fc.hp.com }
START =
LOCAL i, s;
($setg i 99)
(WHILE ($gt @i 0) DO
(IF ($gt @i 1) THEN
($say ($str @i) " bottles of beer on the wall.\n")
($say ($str @i) " bottles of beer.\n")
ELSE
($say "1 bottle of beer on the wall.\n")
($say "1 bottle of beer.\n")
)
($say "You take one down, pass it around.\n")
($setg i ($minus @i 1))
(IF ($gt @i 1) THEN
($say ($str @i) " bottles of beer on the wall.\n\n")
ELSEIF ($eq @i 1) THEN
($say "1 bottle of beer on the wall.\n\n")
ELSE
($say "No more bottles of beer on the wall.\n")
)
)
($spec 3)
;
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