April 29, 2024, 10:47:44 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Aurora joins the '99 Bottles of Beer' brigade!

Started by Kale, November 01, 2006, 05:08:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Kale

Aurora joins the '99 Bottles of Beer' brigade:

http://www.99-bottles-of-beer.net/

It will probably be a few days until it gets approved. ;)


Declare Import, Beep(int Frequency, int Duration);
Declare Import, Sleep(int Milliseconds);

Sub PlaySong(string Music, int Duration)
{
for (x = 1 ; x < Len(Music) ; x++)
{
Select(StrMid(Music, x, 1))
{
Case "A":
Beep(220, Duration);
Case "D":
Beep(147, Duration);
Case "E":
Beep(165, Duration);
Case "F":
Beep(185, Duration);
Case "G":
Beep(196, Duration);
Case "0":
Sleep(Duration);
}
}
}

Global Sub main()
{
string Text = " bottle(s) of beer";
string TextEnd = " on the wall";
for (x = 99;x > 0;x--)
{
Print(" " + Str$(x) + Text + TextEnd + ",");
PlaySong("GGGDDDGGGG000", 130);
Print(" " + Str$(x) + Text + ".");
PlaySong("AAAEEEA0000", 130);
Print(" Take one down, pass it around,");
PlaySong("GFFFFFFFFFF000", 130);
Print(Chr$(32) + Str$(x - 1) + Text + TextEnd + Chr$(46));
PlaySong("DDDDEFGGGG000", 130);
Print(Chr$(32));
}
}

Zen


Steven Picard



Zen