For Loop by xgf

p="!"for i=1,10 do s=("  "):rep(i-1)p=p:gsub("!",("for v%d = %d to 9\n  %s!\n%snext"):format(i,1/i,s,s))_G[i]=i end print((p:gsub("!","print v"..table.concat(_G,",v"))))\x0d

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

download

return to the top page