Language SLI (Simulation language interpreter)
(Language of the neural simulator NEST)
| Date: | 04/08/08 |
| Author: | Rüdiger Kupper |
| URL: | http://ruedigerkupper.de |
| Comments: | 0 |
| Info: | http://nest-initiative.org |
| Score: |
/say_bottles
{
dup 0 eq
{
pop
(no more bottles of beer) =only
}
{
dup =only
( bottle) =only
1 eq not {(s) =only} if
( of beer) =only
} ifelse
} def
/say_bottles_capitalized
{
dup 0 eq
{
pop
(No more bottles of beer) =only
}
{
say_bottles
} ifelse
} def
99 -1 0
{
dup say_bottles_capitalized ( on the wall, ) =only
dup say_bottles (.) =
dup 0 eq not
{
(Take one down and pass it around, ) =only
1 sub
}
{
(Go to the store and buy some more, ) =only
pop
99
} ifelse
say_bottles ( on the wall.) =
() =
} for
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