function a($)
dim $w,$b
if $+0>$
$=0+$
$b=" bottle"
if $
$a="Take one down and pass it around, " + a($-1) + $b
else
$a="Go to the store and buy some more, " + a(99) + $b
endif
if $<>2
$a=$a + s
endif
if $<>1
$b=$b + s
endif
$w=" of beer on the wall"
$a=chr(asc(a($))-32) + right(a($),~) + $b + $w + ", " + a($) + $b + " of beer. " + $a + $w + "."
else
$b="no more",one,two,three,four,five,six,seven,eight,nine,ten,eleven,twelve,thirteen,fourteen,fifteen,sixteen,seventeen,eighteen,nineteen,twenty,thirty,forty,fifty,sixty,seventy,eighty,ninety
if $<20
$a=$b[$]
else
$a= $b[18+ $/10]
if $ mod 10
$a=$a + "-" + $b[$ mod 10]
;endif
;endif
;endif
endfunction