Language RXML
Date: | 04/20/05 |
Author: | Tomas |
URL: | n/a |
Comments: | 1 |
Info: | n/a |
Score: | (3.00 in 98 votes) |
This version of 99 bottles is written in RXML, a markup language used by the Roxen webserver, found at www.roxen.com. <comment> 99 bottles of beer on the wall in RXML Written by Tomas Berndtsson <tomas@nocrew.org> Tested in Roxen WebServer 2.1. </comment> <set variable="var.pl" value="s"/> <for variable="var.i" from="99" to="1"> &var.i; bottle&var.pl; of beer on the wall,<br> &var.i; bottle&var.pl; of beer.<br> Take one down and pass it around,<br> <set variable="var.j" expr="&var.i; - 1"/> <if variable="var.j = 1"><set variable="var.pl" value=""/></if> <else><set variable="var.pl" value="s"/></else> <if variable="var.j = 0">No more</if> <else>&var.j;</else> bottle&var.pl; of beer on the wall.<p> </for> Greetings, Tomas
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
frank said on 07/24/06 11:51:57
nice, but not working.
this will work:
<set variable="var.pl" value="s"/>
<for variable="var.i" from="99" to="1">
&var.i; bottle&var.pl; of beer on the wall,<br/>
&var.i; bottle&var.pl; of beer.<br/>
Take one down and pass it around,<br/>
<set variable="var.j" expr="&var.i; - 1"/>
<if variable="var.j = 1"><set variable="var.pl" value=""/></if>
<else><set variable="var.pl" value="s"/></else>
<if variable="var.j = 0">No more</if>
<else>&var.j;</else>
bottle&var.pl; of beer on the wall.<p/>
</for>