Define Procedure

Top  Previous  Next

Description


The Define Procedure command creates a Procedure and specifies the objects that are passed between the Mission Plan and the Procedure. The EndProcedure statement must be present at the end of each Procedure. See the Using Procedures Script Reference for more information.

 

 

Syntax


Generic Example

 

Define Procedure myProcedure(Spacecraft mySpacecraft, Variable myVariable1, Variable myVariable2, Array myArray);

    // ...
    // Procedure Code
    // ...
EndProcedure;

 

Example using ExitProcedure

 

Define Procedure myProcedure(Spacecraft mySpacecraft, Variable myVariable1);

    // ...
    If(mySpacecraft.A < 8000);

          ExitProcedure;

    End;

    // ...
EndProcedure;

 

 

Details


Any FreeFlyer object type can be passed between FreeFlyer and a Procedure.

An unlimited number of objects can be specified.

The Procedure definition must be followed by an EndProcedure statement.

The ExitProcedure command allows you to immediately exit a Procedure, skipping any remaining commands.

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

oA Procedure file (.FFProcedure) should contain the Define Procedure and EndProcedure commands, as well as the body of the Procedure code.

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

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

 

 

See Also


Include Command

Call Command

Procedures Script Reference

Structs Script Reference