Voting

Category

esoteric language

Bookmarking

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

Language GlovePIE

Date:12/16/08
Author:Miff Falden
URL:n/a
Comments:0
Info:http://carl.kenner.googlepages.com/glovepie
Score: (3.00 in 3 votes)
// 99 Bottles of Beer
// Rendered painstakingly in GlovePIE
// by Miff Falden.  <http://www.furaffinity.net/user/miffthefox>
//
// Since GlovePIE is not a procederual language,
// this program abuses macros to get the job done.
//
// This program is licensed under a Creative Commons Attribution 3.0 Unported License
// http://creativecommons.org/licenses/by/3.0/
//


// This initial macro is used to print the welcome statement and
// initilize var.Bottles.
If True Then
DebugPrint ("")
DebugPrint ("")
DebugPrint ("99 Bottles of Beer")
DebugPrint ("Rendered painstakingly in GlovePIE")
DebugPrint ("___________________________________________")
var.Bottles = 99
// Wait 999 days so that this macro does not loop.
// (Within a reasonable timeframe)
Wait 999 Days
End If

// This is the start of a second macro
// that runs when var.Bottles > 0.
If var.Bottles > 0 Then

// Print a blank line every iteration.
DebugPrint ("")

// Inside a macro, If statments function as in other languages.
If var.Bottles > 2 Then
DebugPrint (var.Bottles + " bottles of beer on the wall, " + var.Bottles + " bottles of beer.")
Dec(var.Bottles) // Decrease var.Bottles by 1
DebugPrint ("Take one down and pass it around, " + var.Bottles + " bottles of beer on the wall.")
Else If var.Bottles = 2 Then
// The last three verses are so irregular, so they've just been printed here.
// (Yes, I know it's cheating, but they're fringe cases!)
DebugPrint("2 bottles of beer on the wall, 2 bottles of beer.")
DebugPrint("Take one down and pass it around, 1 bottle of beer on the wall.")
DebugPrint("")
DebugPrint("1 bottle of beer on the wall, 1 bottle of beer.")
DebugPrint("Take one down and pass it around, no more bottles of beer on the wall.")
DebugPrint("")
DebugPrint("No more bottles of beer on the wall, no more bottles of beer.")
DebugPrint("Go to the store and buy some more, 99 bottles of beer on the wall.")
DebugPrint("")
DebugPrint("")

ExitProgram // We're done here, terminate the script.
End If // End inner If

End If // End macro

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: