<* 99-bottles-of-beer in HSC, by Matthias Bethke Pseudo-iterative version, process using: hsc xhtml compact 99bottles-iter.hsc *> <$define PAGE:string/C="99 Bottles of Beer"> <$macro BOB N:num/R OTW:bool> <$if COND=(N = '0')>No more<$else><(N)> <$if COND=(N <> '1')>bottles<$else>bottle of beer <$if COND=(set OTW)>on the wall <$macro ITERATE COND:string/R CONTENT:string/R> <( "<$if COND=(" + COND + ")>" + "<(CONTENT)>" + "" + "" )> <$macro FOR /CLOSE VAR:string/R START:num=1 TO:num/R STEP:num=1> <("<$define " + VAR + ":num=" + START + ">")> <$if COND=(STEP < "0")> ='" + TO +"'") CONTENT=(HSC.Content + "<$let " + VAR + "=(" + VAR + "&'" + STEP + "')>")> <$else> ")> <*** Page starts here ***> <(PAGE)>

<(PAGE)>

<$if COND=(bottles = '0')>

Go to the store, buy some more...

<$else>

,

Take <$if COND=(bottles = '1')>it<$else>one down, pass it around,
.