Define Macro

Top  Previous  Next


The Define Macro command defines a Macro and specifies the identifiers that will be replaced when the Macro is instantiated. Macros are instantiated using the Call command. The EndMacro statement must be present at the end of each Macro. See the Using Macros Script Reference for more information.




Define Macro myMacro(mySpacecraft, myVariable, myArray);

    // ...
    // Macro Code
    // ...




Any identifier can be passed between FreeFlyer and a Macro.

An unlimited number of identifiers can be specified.

The Macro definition must be followed by an EndMacro statement.

You can define Macros in a separate file and include the file in your Mission Plan.

oA macro file (.FFMacro) should contain the Define Macro and EndMacro commands, as well as the body of the macro code.

oThe Mission Plan (.MissionPlan) should contain the Include command to give the Mission Plan access to the macro file, and the Call command wherever it is desired to execute the macro code.

oIt is possible to define multiple Macros in a single file, or to define Macros within the Mission Plan itself.



See Also

Include Command

Call Command

Define Procedure Command