99 bottles of beer on the wall

David Vaughan drvaughan55 at mac.com
Sat Jul 27 02:18:01 EDT 2002


Well, some fool had to do it.

Here is my example which I submit for any polishing before we offer it 
to the site. It is a stack script in a stack of one field, called 
"Song". On opening the stack, it runs and quits. This makes it 
reasonably equivalent to faceless or terminal-oriented programs.

Variations are available by changing the two initialised variables. Note 
that the case 0 and case 1 instances wait twice as long as between all 
the other cycles, to give the observer a little more time to read the 
differences.

regards
David
====================== 99 Bottles in Revolution ========================
constant singAlong=1
local bottles=99

on openCard
   DrinkThem
end openCard

on DrinkThem
   switch bottles
   case 0
     put "There were no more bottles of beer on the wall" into field 
"song"
     wait (singAlong * 2) seconds
     quit
     break
   case 1
     put "One last bottle of beer on the wall." & return into field "song"
     put "Take it down and pass it around." after field "song"
     wait singAlong seconds
     break
   default
     put bottles && "bottles of beer on the wall." & return into field 
"song"
     put "Take one down and pass it around." after field "song"
   end switch
   subtract 1 from bottles
   send DrinkThem to me in singAlong seconds
end DrinkThem
==========================================================

On Saturday, July 27, 2002, at 01:58 , Kee Nethery wrote:

> Just thought I'd mention that there is no example code for Revolution 
> singing 99 bottles of beer on the wall and of the 300+ languages 
> represented. <http://99-bottles-of-beer.ls-la.net/r.html>
>
> Kee Nethery
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list