Language Word
| Date: | 04/20/05 |
| Author: | Mark Pilgrim |
| URL: | n/a |
| Comments: | 0 |
| Info: | n/a |
| Score: |
Sub MAIN
REM "99 bottles of beer on the wall"
REM Microsoft Word WordBasic macro language version
REM written by Mark Pilgrim, f8dy@netaxs.com
FileNew
beer$ = "99"
bottle$ = " bottles "
For count = 99 To 1 Step - 1
Insert beer$ + bottle$ + "of beer on the wall,"
InsertPara
Insert beer$ + bottle$ + "of beer,"
InsertPara
Insert "Take "
If count > 1 Then
Insert "one"
Else
Insert "it"
End If
Insert " down, pass it around,"
InsertPara
If count > 1 Then
beer$ = Str$(count - 1)
beer$ = Right$(beer$, Len(beer$) - 1)
If count = 2 Then bottle$ = " bottle "
Insert beer$ + bottle$ + "of beer on the wall."
InsertPara
Else
Insert "No more bottles of beer on the wall."
End If
InsertPara
Next
End Sub
Download Source | Write Comment
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