**CIGAL Reference Manual, Chapter 2 (Commands): ARGSHIFT** ===== ARGSHIFT -- Shift command line arguments in a CIGAL macro program ===== ** 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:**\\ [[jvs:cigal:manual:chapter2:default|DEFAULT(2)]], [[jvs:cigal:manual:chapter2:macro|MACRO(2)]], [[jvs:cigal:manual:chapter1:macros|MACROS(1)]] [[jvs:cigal|CIGAL Home]], [[jvs:cigal:manual|CIGAL Manual]], [[jvs:cigal:manual:chapter2|Commands List]], [[jvs:cigal:manual:help|Manual Help]]