For Loop by znz

s='!'\x0d
10.downto(1){|n|s="for v#{n} = #{n>1?0:1} to 9\x0d
#{s.gsub(/^/,'  ').sub(/!/,"!,v#{n}")}\x0d
next"}\x0d
$><<s.sub(/!,/,'print ')

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top