Code: Select all
sub main
| Accumalate positional args into an array.
| The number of elements in the array to be
| stored as element 0.
/varset l0 0
:GetArgs
/varset l1 p$int($l0)
/if "$$l1"!="" {
/varadd l0 1
/varset a(0,$l0) "$$l1"
/goto :GetArgs
} else {
/varcalc a(0,0) $l0
}
| demo
/for v0 1 to $a(0,0)
/echo $a(0,$v0)
/next v0
/return
