Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language DXL (DOORS Extension Language)

Date:10/06/05
Author:Paul Worrall
URL:n/a
Comments:0
Info:http://support.telelogic.com
Score: (2.30 in 20 votes)
// Telelogic DOORS(R) Extension Language (DXL) version of 99 Bottles
// Paul Worrall - paul@basilisk.ukfsn.org

int i
for i in 99:1 by -1 do {
    print i " bottle" (i == 1 ? "" : "s") " of beer on the wall, "
    print i " bottle" (i == 1 ? "" : "s") " of beer.\n"
    print "Take one down and pass it around, "
    print ((i - 1) == 0 ? "no more" : (i - 1) "") " bottle" (i-1 == 1 ? "" : "s") 
    print " of beer on the wall\n\n"
}

print "No more bottle of beer on the wall, no more bottles of beer.\n"
print "Go to the store and buy some more, 99 bottles of beer on the wall.\n"

Download Source | Write Comment

Alternative Versions

Comments

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!

Name:

eMail:

URL:

Security Code:
  
Comment: