**CIGAL Reference Manual, Chapter 2 (Commands): DEFAULT** ===== DEFAULT -- Set default values for arguments to a macro command ===== ** usage: default arg1 arg2 ...** The DEFAULT command sets the values to be assigned to any macro arguments that are not specified explicitly in the macro command line. For example, consider the simple macro, TEST.IMP: default 100 200 brighter 400 cold type "Arguments:" $1 $2 $3 $4 $5 If this macro were called as: test 1 34 dimmer 888 hot it would print out: Arguments: 1 34 dimmer 888 hot But if it were called as: test 1 - lighter it would use the default values for the missing arguments and print: Arguments: 1 200 lighter 400 cold In general, it is wise to use the DEFAULT command to provide a default value for every macro argument that is used. For example, if anywhere in your macro you refer to $5, then you should be sure that the default command has a value for the fifth argument. Undefined arguments can produce unpredictable results. The DEFAULT command should appear near the beginning of the macro, before any DECLARE or DEFINE statements. The DEFAULT command has no effect if called outside of a macro program. **See Also:**\\ [[jvs:cigal:manual:chapter2:argshift|ARGSHIFT(2)]], [[jvs:cigal:manual:chapter1:macros|MACROS(1)]], [[jvs:cigal:manual:chapter1:variables|VARIABLES(1)]] [[jvs:cigal|CIGAL Home]], [[jvs:cigal:manual|CIGAL Manual]], [[jvs:cigal:manual:chapter2|Commands List]], [[jvs:cigal:manual:help|Manual Help]]