2
# forloop(var, from, to, stmt) - improved version:
3
# works even if VAR is not a strict macro name
4
# performs sanity check that FROM is larger than TO
5
# allows complex numerical expressions in TO and FROM
6
define(`FORLOOP', `ifelse(eval(`($3) >= ($2)'), `1',
7
`pushdef(`$1', eval(`$2'))_FORLOOP(`$1',
8
eval(`$3'), `$4')popdef(`$1')')')
10
`$3`'ifelse(indir(`$1'), `$2', `',
11
`define(`$1', incr(indir(`$1')))$0($@)')')
b'\\ No newline at end of file'