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 M5

Date:04/20/05
Author:Ron Franke-Polz
URL:n/a
Comments:0
Info:n/a
Score: (3.50 in 2 votes)
!rem 99 bottles of beer in the M5 macro language
!rem programmer Ron Franke-Polz - ronaldFP@aol.com
!rem
!rem define a macro which contains the song
!rem
!macro song
[v $1] [if [eq $1 1] "bottle" "bottles"] of beer on the wall,
[v $1] [if [eq $1 1] "bottle" "bottles"] of beer,
take one down and pass it around,
[if [eq [- $1 1] 1] "No more" [- $1 1]] [if [eq [- $1 1] 1] "bottle" "bottles"] of beer on the
wall.

!endm
!rem
!rem sing the song 99 times
!rem
!eval [set count 99]
!while count
    !song (count)
    !eval [-- count]
!endwhile

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: