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 Alice 2.x

(Original)

Date:04/21/12
Author:Kevin G. Mess
URL:n/a
Comments:0
Info:http://www.alice.org/
Score: (2.50 in 6 votes)
world

Events

When the world starts
Do: world.99bottles

Methods

world.99bottles()
    bottles = 99, text = "99.0 bottles"
    // Alice 2.2 Implementation
    // Author: Kevin G. Mess
    // Date: 04/21/2012
    While ( bottles != 0 )
        skater_guy say ( text joined with " of beer on the wall," )
        skater_guy say ( text joined with " of beer" )
        skater_guy say ( "Take one down, pass it around," )
        decrement bottles by 1
        If ( bottles == 1 )
            text set value to "1.0 bottle"
        Else
            text set value to ( ( bottles as string ) joined with " bottles" )
        skater_guy say ( text joined with " of beer on the wall." )
        Wait 1 second

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: