Zum Inhalt springen

99 Bottles of Beer: Unterschied zwischen den Versionen

Phantasus (Diskussion | Beiträge)
99 bottles of beer in Forth, reva
Clifford (Diskussion | Beiträge)
+ SPL
Zeile 1: Zeile 1:
Das gute alte 99 bottles in Forth
= 99 bottles in Forth =


99 bottles of beer on the wall,  
99 bottles of beer on the wall,  
Zeile 6: Zeile 6:
98 bottles of beer on the wall.
98 bottles of beer on the wall.
...  
...  


  | 99 Bottles of Beer in Reva Forth
  | 99 Bottles of Beer in Reva Forth
Zeile 20: Zeile 19:
  ;
  ;
  99beer
  99beer
= 99 bottles in [http://www.clifford.at/spl/ SPL] =
for (var i=99; i>=0; i--) {
  write("\n${i ? i : "No more"} bottle${i != 1 ? "s" : ""} of beer on the "
        "wall, ${i ? i : "no more"} bottle${i != 1 ? "s" : ""} of beer.\n");
  write(i>0 ? "Take one down and pass it around, " :
              "Go to the store and buy some more, ");
  write("${i ? i>1 ? i-1 : "no more" : 99} bottle${i == 2 ? "" : "s"} "
        "of beer on the wall.\n${i ? "" : "\n"}");
}