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 IGOR

Date:04/20/05
Author:Kenneth A. Goldberg
URL:n/a
Comments:0
Info:n/a
Score: (2.30 in 10 votes)
// IGOR version of: 99 Bottles of Beer
// IGOR PRO is a graphing and numerical analysis environment by WaveMetrics, Inc.
//  http://www.wavemetrics.com/
//
//  Kenneth A. Goldberg, http://goldberg.lbl.gov
//
Proc beer(count)
   variable count
   variable i=count
   do
     if (i > 1)
       print, i, "Bottles of beer on the wall, ",i, " Bottles of beer"
     else
       print, i, "Bottle of beer on the wall, ",i, " Bottle of beer"
     endif

     print,
     i -= 1	// increment our loop variable
     if (i > 1)
       print, "Take one down pass it around, ", i, "Bottles of beer on the wall"
     else
       if (i == 1)
         print,  "Take one down pass it around, 1 Bottle of beer on the wall"
       else
         print,  "Take one down pass it around, NO MORE botles of beer on the wall"
       endif
     endif

   while(i > 0)
   print, "Go to the store and buy some more."
End

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: