Language 4D
| Date: | 04/20/05 |
| Author: | Anonymous |
| URL: | n/a |
| Comments: | 2 |
| Info: | n/a |
| Score: |
`<A HREF="http://www.4d.com">4th Dimension</A> is a
` RDBMS development environment
`available for Macintosh and Windows.
` 4D version of 99 bottles of bottels of beer on the wall
` 2003 (john.windberg@dwdev.com)
ON ERR CALL("")
C_STRING(1;$s)
C_INTEGER($beers;$tickCount;$delay)
$delay:=100
$s:="s";
For ($beers;4;0;-1)
MESSAGE(String($beers)+" bottle"+$s+" of beer on the
wall, ")
$tickCount:=Tickcount
While (Tickcount<($tickCount+$delay))
DELAY PROCESS(Current process;1)
End while
MESSAGE(String($beers)+" bottle"+$s+" of beer, ")
$tickCount:=Tickcount
While (Tickcount<($tickCount+$delay))
DELAY PROCESS(Current process;1)
End while
If ($beers=0)
MESSAGE("Go to the store, buy some more, ")
$tickCount:=Tickcount
While (Tickcount<($tickCount+$delay))
DELAY PROCESS(Current process;1)
End while
MESSAGE("99 bottles of beer on the wall.")
$tickCount:=Tickcount
While (Tickcount<($tickCount+$delay))
DELAY PROCESS(Current process;1)
End while
Else
MESSAGE("Take one down, pass it around, ")
$tickCount:=Tickcount
While (Tickcount<($tickCount+$delay))
DELAY PROCESS(Current process;1)
End while
If ($beers=2)
$s:=""
Else
$s:="s"
End if
MESSAGE(String($beers-1)+" bottle"+$s+" of beer on the
wall.")
$tickCount:=Tickcount
While (Tickcount<($tickCount+$delay))
DELAY PROCESS(Current process;1)
End while
End if
End 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