Considerations for the macro writer

When you code a macro to use a parameter list, remember that:
  • The macro writer need not and cannot set any switches, inside the macro, to indicate that a particular variable is to be initialized by means of a parameter list. (Of course, the macro writer can add a comment to this effect.) Information about a parameter list is not stored inside the macro.
  • Even without a parameter list, each variable has an initial value, which is either a default initial value (see Table 1) or an initial value specified by the macro writer.
As a general principle, remember that the end user must be able specify the parameter list correctly, without syntax errors or other errors. To help end users, consider the following actions:
  • Describe the parameter list in the Description field on the Macro tab of the Macro Editor. An end user can view the contents of the Description field by displaying the Properties dialog for the macro from either:
    • The Available macros dialog (click the Select a macro icon in the Macro Manager toolbar).
    • The Play macros dialog (click Actions > Play macro).
  • Code the macro to check for improperly initialized variables and post a warning message if a variable is not initialized properly.
  • Create a customized button in the main toolbar that plays the macro with the correct parameters.