Hello -- On Sun, 22 Jul 2001, MikkelFJ wrote: > > > > > 99.downto(0){|x|w=" on the wall";u=" #{x>0?(x):'no more'} > > bottle#{x!=1?'s':''} of beer";p u+w+u+". Take one down, pass it > > around,"+u+w} See yesterday's posts about this version and its derivatives. It doesn't work as written (doesn't decrement in the right place). > Why does the following not produce any beer? > > (99..0).each{|x|w=" on the wall";u=" #{x>0?(x):'no more'} > bottle#{x!=1?'s':''} of beer";p u+w+u+". Take one down, pass it > around,"+u+w} Because you're using a backwards range. It saves bytes, but it doesn't iterate :-) David -- David Alan Black home: dblack / candle.superlink.net work: blackdav / shu.edu Web: http://pirate.shu.edu/~blackdav