2
# Creates a new array with the given name
4
define(`CREATEARRAY',`define(`$1_COUNT',0)')
6
# Pushes a value onto the array
7
# PUSHARRAY(ArrayName,Value)
9
`define($1_`'$1_COUNT,`$2')dnl
10
define(`$1_COUNT',eval($1_COUNT+1))')
12
# Obtains the current length of the array
13
define(`LENGTHARRAY',$1_COUNT)
15
# Iterates over th array, expanding "Expand" on each iteration
16
# setting the value "Var" to the current value from the array
17
# ITERARRAY(ArrayName, Var, Expand)
18
define(`ITERARRAY',`_ITERARRAY($1,$2,$3,0)')
20
`ifelse($1_COUNT,$4,`',`dnl
21
define(`$2',$1_`'$4)dnl
24
_ITERARRAY(`$1',`$2',`$3',eval($4+1))dnl
b'\\ No newline at end of file'