Language VBScript
(correct lyrics version)
| Date: | 07/19/05 |
| Author: | exec |
| URL: | n/a |
| Comments: | 5 |
| Info: | n/a |
| Score: |
'99 Bottles of Beer in VBS
'coded by exec
For i = 99 To 0 Step -1
Select Case i
Case 1
msg i & " Bottle of beer on the wall, " & i & " bottle of beer."
msg "Take one down and pass it around, no more bottles of beer on the wall."
Case 0
msg "No more bottle of beer on the wall. No more bottles of beer..."
msg "Go to the store and buy some more... 99 bottles of beer."
Case Else
msg i & " Bottles of beer on the wall, " & i & " bottles of beer."
msg "Take one down and pass it around, " & i - 1 & " bottles of beer on the wall."
End Select
Next
Sub msg(message)
MsgBox message, , "99 Bottles of Beer"
End Sub
Download Source | Write Comment
Alternative Versions
| Version | Author | Date | Comments | Rate |
|---|---|---|---|---|
| WSH using recursion and Microsoft Agent | Bob Stammers | 03/10/06 | 0 | |
| long version | Jonathan Harrison | 05/17/05 | 2 | |
| Demonstrates use of "class" | Bruce M. Axtens | 09/29/05 | 0 | |
| short version | Philipp Winterberg | 04/20/05 | 0 | |
| WSF, Microsoft Agent, EN/FR/DE | Bob Stammers | 06/02/06 | 1 |
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!
Comments
what else then msgboxes would you use?
You could also stream the lyrics into a textfile then display using notepad.
But at that time I don't knew another Method^^"
When you get to i=2 your i - 1 & " bottles of beer on the wall." is still plural: 1 bottles of beer on the wall."