Language ObjectPAL
(Paradox for Windows)
Date: | 08/18/06 |
Author: | James R. (Jake) Mireles |
URL: | n/a |
Comments: | 0 |
Info: | http://en.wikipedia.org/wiki/ObjectPAL |
Score: | (2.96 in 112 votes) |
method run(var eventInfo Event) ; ObjectPAL version of "99 Bottles Of Beer On The Wall" ; By James R. (Jake) Mireles ; Houston, TX ; 8/17/2006 ; Save this as a Paradox script (*.ssl file). ; It will run under any version of Paradox for Windows. var i SmallInt endVar for i from 99 to 1 step -1 ; Use immediate-if branching to properly format plurals. msgInfo("99 Bottles Of Beer On The Wall", string(i) + " bottle" + iif(i = 1, "", "s") + " of beer on the wall.\n" + string(i) + " bottle" + iif(i = 1, "", "s") + " of beer.\n" + "You take one down, pass it around.\n" + iif(i-1 = 0, "No", string(i-1)) + " bottle" + iif(i-1 = 1, "", "s") + " of beer on the wall." ) endFor ; Now for the big, rousing finish. msgInfo("99 Bottles Of Beer On The Wall", "NO bottles of beer on the wall.\n\n" + "NO bottles of beer!\n\n" + "You go to the store and BUY SOME MORE.\n\n" + "Nine-ty-nine bot-tles of beer-on-the-wall!" ) endMethod
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