The False language was created by Wouter van Oortmerssen (Wouter@alf.let.uva.nl).
{ False version of 99 Bottles by Marcus Comstedt (marcus@lysator.liu.se) }
[$0=["no more bottles"]?$1=["One bottle"]?$1>[$." bottles"]?%" of beer"]b:
100[$0>][$b;!" on the wall, "$b;!".
"1-"Take one down, pass it around, "$b;!" on the wall.
"]#%
// 99 Bottles of Beer
// Written in FAST (see http://jump.to/fms -> FAST)
// (c) 2003-05-21 Fabian M. Suchanek
VAR i 99
WHILE (i > 0) (
PRINTINT i 2
PRINT " Bottle"
IF (i > 1) (PRINT "s")
PRINT " of beer on the wall\n"
PRINT "Take one down, pass it around\n"
DEC i
)
PRINT "Go to the store, buy some more\n"
Enter Browse Mode
Set Field No. Bottles/Calculation (99)
Set Field Bottle Text/Calculation (>=<=)
Loop
Set Field Bottle Text/Calculation
If(No. Bottles a 1,
No. Bottles & >=bottles of beer on the wall. >= &
No. Bottles & >=bottles of beer.<= & Paragraph &
>=Take one down and pass it around and >=,
No. Bottles & >=bottle of beer on the wall. >= &
No. Bottles & >=bottle of beer.<= & Paragraph &
>=Take one down and pass it around and >=) & Paragraph &
If(No. Bottles - 1 a 1,
(No. Bottles - 1) & >= bottles of beer on the wall<=,
(No. Bottles - 1) & >= bottle of beer on the wall<=)
Refresh Window
Comment (Viewing text is optional)
Speak (Speech Data: Field: Bottle Text/Wait for completion)
Comment (Speech is optional)
Set Field No. Bottles/Calculation (No. Bottles - 1)
Exit Loop If (Calculation (No. Bottles = 0))
End Loop
Set Field Bottle Text/Calculation (>=0 bottles of beer on the wall.
0 bottles of beer. Go to the store and buy some more.<= &
Paragraph & >=99 bottles of beer on the wall.<=
Refresh Window
Speak (Speech Data: Field: Bottle Text/Wait for completion)
' FirstBasic/PowerBasic version of 99 Bottles of beer (Bottles.bas)
' See http://www.powerbasic.com/
' Philipp Winterberg, http://www.winterbergs.de
KEY OFF : COLOR 7, 0 : CLS
FOR b% = 99 TO 1 STEP -1
PRINT STR$(b%) + " bottle(s) of beer on the wall,"
PRINT STR$(b%) + " bottle(s) of beer."
PRINT "Take one down, pass it around,"
PRINT STR$(b%-1) + " bottle(s) of beer on the wall."
PRINT " "
NEXT b%
END
01.10 c Focal-8 version of 99 Bottles of beer
01.20 c Hacked by Akira KIDA, <SDI00379@niftyserve.or.jp>
10.10 set bottles = 99
10.20 do 20
10.30 quit
20.10 for i = bottles, 1, -1; do 30
20.20 return
30.10 set b = i
30.20 do 40 ; type " on the wall, "
30.30 do 40 ; type ".", ! , "Take one down, pass it around.", !
30.40 set b = i - 1
30.50 do 40 ; type " on the wall.", !, !
30.60 return
40.10 do 50
40.20 type " of beer"
40.30 return
50.10 if (b - 1) 50.20, 50.40, 50.60
50.20 type "No more bottles"
50.30 return
50.40 type %1.0, b, " bottle"
50.50 return
50.60 type %1.0, b, " bottles"
50.70 return
Focus is a fourth generation data reporting/management language/toolset.
It runs on a numerous platforms, from Windows up to MVS.
<a href=http://www.ibi.com/>http://www.ibi.com/</a>
-* Randy Gleason
-* 99 beer challenge
-REPEAT ENDBEER FOR &COUNTER FROM 99 TO 1 STEP -1
-SET &PL = IF &COUNTER EQ 1 THEN '' ELSE 's' ;
-TYPE &COUNTER bottle&PL of beer on the wall, &COUNTER bottle&PL of beer
-TYPE Take one down, pass it around
-TYPE
-ENDBEER
-TYPE No more bottles of beer on the wall, No more bottles of beer
-TYPE And we all shout out..WHO'S BUYING THE NEXT ROUND!
//
//Forte TOOL. By Lee Fuller 06/02/2003
//
lBeerstring : string = '%1 Bottles of beer on the wall';
lBeerstring2 : string = '%1 bottles of beer';
lDrink : string = 'Take one down, pass it around.';
for i in 99 to 1 by -1 do
task.lgr.putline(textdata().ReplaceParameters(lBeerstring, integerdata(value = i)));
task.lgr.putline(textdata().ReplaceParameters(lBeerstring2, integerdata(value = i)));
task.lgr.putline(lDrink);
task.lgr.putline(textdata().ReplaceParameters(lBeerstring, integerdata(value = i-1)));
task.lgr.putline();
end for;
\ Forth version of the 99 Bottles program.
\ Dan Reish, dreish@izzy.net
: .bottles ( n -- n-1 )
dup 1 = IF ." One bottle of beer on the wall," CR
." One bottle of beer," CR
." Take it down,"
ELSE dup . ." bottles of beer on the wall," CR
dup . ." bottles of beer," CR
." Take one down,"
THEN
CR
." Pass it around," CR
1-
?dup IF dup 1 = IF ." One bottle of beer on the wall;"
ELSE dup . ." bottles of beer on the wall;"
THEN
ELSE ." No more bottles of beer on the wall."
THEN
CR
;
: nbottles ( n -- )
BEGIN .bottles ?dup NOT UNTIL
;
99 nbottles
! F90 (Fortran 90) version of 99 bottles of beer.
! written by Akira KIDA, SDI00379@niftyserver.or.jp
! Note that this source is in FIXED format.
program ninetynine
implicit none
integer, parameter :: BOTTLES = 99
integer :: i
integer :: k
character*7 :: btl = 'bottles'
do i = BOTTLES, 1, -1
k = len(btl)
if (i == 1) k = k - 1
print *, i, btl(1:k), ' of beer on the wall, ',
c i, btl(1:k), ' of beer.'
print *, 'Take one down, pass it around.'
if (i == 0) exit
print *, i, btl(1:k), ' of beer on the wall.'
end do
print *, 'No more bottles of beer on the wall.'
end
C Allen Mcintosh
C mcintosh@bellcore.com
integer bottls
do 50 i = 1, 99
bottls = 100 - i
print 10, bottls
10 format(1x, i2, 31h bottle(s) of beer on the wall.)
print 20, bottls
20 format(1x, i2, 19h bottle(s) of beer.)
print 30
30 format(34h Take one down and pass it around,)
bottls = bottls - 1
print 10, bottls
print 40
40 format(1x)
50 continue
stop
end
program ninetynine
implicit none
integer i
do i=99,1,-1
print*, i,' bottles of beer on the wall, ',i,' bottles of beer'
print*, 'take one down, pass it around, ',i-1,
. ' bottles of beer on the wall'
enddo
end
The scripting language controlling the Foxpro database.
** Randy Jean
FOR x = 100 TO 1 STEP -1
?x,"Bottle(s) of beer on the wall,",x,"bottle(s) of beer"
?" Take one down and pass it around,"
?x-1,"bottle(s) of beer on the wall"
ENDFOR
' FranzBasic version of 99 Bottles of beer (Bottles.bas)
' See http://mitglied.lycos.de/movaxworldhq/basic.htm
' Philipp Winterberg, http://www.winterbergs.de
colour 0, 7 : mouse off : cls
for b = 1 to 99
print
print str$(100-b) + " bottle(s) of beer on the wall,"
print str$(100-b) + " bottle(s) of beer."
print "Take one down, pass it around,"
print str$(99-b) + " bottle(s) of beer on the wall."
endfor
(* Free Pascal version of 99 Bottles of beer (Bottles.pp) *)
(* See http://www.freepascal.org/ *)
(* Philipp Winterberg, http://www.winterbergs.de *)
program Bottles;
var b: byte;
begin
b:= 99;
while b > 0 do
begin
writeln(b, ' bottle(s) of beer on the wall, ');
writeln(b, ' bottle(s) of beer.');
writeln('Take one down, pass it around,'); dec(b);
writeln(b, ' bottle(s) of beer on the wall.' + #13#10)
end
end.
<#--
# 99 Bottles written in FTL
# Stephan Mueller <stephan at chaquotay dot net>
#
# needs some lines written in Java which do nothing except merging
# this template with an empty data model.
#
# For further information on FreeMarker and FTL (FreeMarker Template
# Language), visit http://www.freemarker.org
#-->
<#assign s="s">
<#list 99..1 as bottles>
${bottles} Bottle${s} of beer on the wall,
${bottles} bottle${s} of beer
Take one down and pass it around,
<#if bottles!=2>
<#assign s="s">
<#else>
<#assign s="">
</#if>
${bottles-1} bottle${s} of beer on the wall
<#flush>
</#list>
\ 99 bottles of beer in Froth, by Leo Wong, a teetotaler 6FEB96 +
\ Pass it around.
: LYRICS [CHAR] ! PARSE TUCK HERE CHAR+ SWAP CHARS MOVE DUP C, CHARS ALLOT ;
: VOCALIZE ( a) COUNT TYPE ;
: SING CREATE LYRICS DOES> VOCALIZE ;
SING NO_MORE No more !
SING BOTTLE bottle!
SING BOTTLES bottles!
SING OF_BEER of beer!
SING ON_THE_WALL on the wall!
SING TAKE Take !
SING IT it!
SING ONE one!
SING DOWN_AND_PASS_IT_AROUND down and pass it around!
SING GO_TO_THE_STORE_&_BUY_SOME_MORE Go to the store and buy some more!
SING COMMA ,!
SING PERIOD .!
: ?: CREATE ( n) , ' , ' ,
DOES> ( n) TUCK @ <> 1- CELLS - @ EXECUTE ;
: NONE ( n) DROP NO_MORE ;
: SOME ( n) . ;
0 ?: HOW_MANY NONE SOME
1 ?: BOTTLE(S) BOTTLE BOTTLES
1 ?: IT|ONE IT ONE
: COMMERCIAL ( 0 - 99) GO_TO_THE_STORE_&_BUY_SOME_MORE 99 + ;
: SHAREWARE ( n - n-1) DUP TAKE IT|ONE DOWN_AND_PASS_IT_AROUND 1-
;
0 ?: main(){0?99:--} COMMERCIAL SHAREWARE
: BURP ( n - n n) DUP ;
: HOW_MANY_BOTTLES_OF_BEER ( n n n) HOW_MANY BOTTLE(S) OF_BEER ;
: Froth ( n - n')
CR BURP BURP BURP HOW_MANY_BOTTLES_OF_BEER ON_THE_WALL COMMA
CR BURP BURP BURP HOW_MANY_BOTTLES_OF_BEER COMMA
CR BURP main(){0?99:--} COMMA
CR BURP BURP BURP HOW_MANY_BOTTLES_OF_BEER ON_THE_WALL PERIOD
CR ;
: LeoWong ( n) DROP ;
: SONG 99