Talk:Muriel

From Esolang
Jump to navigation Jump to search

The Muriel program for 99 bottles of beer doesn't work because of operator precedence. It should be (b>0)*&Z instead of b>0*&Z, as well as in R. Here is a fixed version:

b:99;
A:$b+" bottle"+(%"s",0,1-(b=1))+" of beer";
.A+" on the wall,\n"+A+",\nTake one down, pass it around,\n";
b:b-1;
.$b+" bottle"+(%"s",0,1-(b=1))+" of beer on the wall.\n\n";
Q:";\nA:$b+\" bottle\"+(%\"s\",0,1-(b=1))+\" of beer\";\n.A+\" on the wall,\\n\"+A+\",\\nTake one down, pass it around,\\n\";\nb:b-1;\n.$b+\" bottle\"+(%\"s\",0,1-(b=1))+\" of beer on the wall.\\n\\n\";\nQ:\"";
R:"\";\nZ:\"b:\"+$b+Q+|Q+\"\\\";\\nR:\\\"\"+|R+R;\n@%Z,0,(b>0)*&Z";
Z:"b:"+$b+Q+|Q+"\";\nR:\""+|R+R;
@%Z,0,(b>0)*&Z

BoundedBeans (talk) 16:23, 21 September 2023 (UTC)