CIGAL Reference Manual, Chapter 2 (Commands): ARGSHIFT
usage: argshift
ARGSHIFT shifts the arguments sent to a macro program one place to the left. Thus, the second argument becomes the first, the third becomes the second, etc. This command allows you to cycle through a list of macro arguments, getting around the limitation that macro arguments must be specified explicitly (eg. $1, $2,…). For example, if you want to make a loop that adds up numeric command arguments you could use:
default -1 -1 -1 -1 -1 -1 -1 -1 declare sum sum = 0 while($1 >= 0) { sum = sum + $1 argshift } type sum
See Also:
DEFAULT(2),
MACRO(2),
MACROS(1)