Language PasScript
| Date: | 04/20/05 |
| Author: | Philipp Winterberg |
| URL: | http://www.winterbergs.de/ |
| Comments: | 0 |
| Info: | http://users.ints.net/virtlabor/passcript/ |
| Score: |
// PasScript version of 99 Bottles of beer (Bottles.pas)
// See http://users.ints.net/virtlabor/passcript/
// Philipp Winterberg, http://www.winterbergs.de
program Bottles;
var
WordApp, Range: variant;
b: integer;
Strophe: string;
begin
CoInitialize;
try
WordApp:= CreateOleObject('Word.Application');
WordApp.Visible:= true;
WordApp.Documents.Add;
Range:= WordApp.Documents.Item(1).Range;
for b:=99 downto 1 do
begin
Strophe:= inttostr(b) + ' bottle(s) of beer on the wall,' +#13#10+
inttostr(b) + ' bottle(s) of beer.' +#13#10+
'Take one down, pass it around,' +#13#10+
inttostr(b-1) + ' bottle(s) of beer on the wall.' +#13#10;
Range.Text:= Range.Text + Strophe
end
finally
CoUninitialize
end
end.
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