Step 3 – Enter Routine to call and Return Variable.

 

Note – This step will be skipped if you selected “Build Skeleton” in Step one.

 

Typically your macro will execute an existing routine after passing the relevant arguments.

 

Select or enter the Subroutine Name to be executed by the macro.  Click on “Get Labels” to populate the drop down with all the labels in the current project in the IDE.

 

You can make the macro Call or Jump to the routine by selecting “Use GoSub” or “Use GoTo” options.

 

If you selected “Returns a Value” in Step 1 you will also be asked to define the “Return Var” and its “Data Type”.  As in Step 2, “Get Vars” will update the drop down with a list of all the variables in the active project in the IDE.

 

(If “Get Vars” had already been selected in Step 2 these variables will already have been added into the drop down)

 

When “Allow Alt” is selected the macro will attempt to force the return variable into declared data type of the receiving variable. See Using Alternative Data Types for further information.

 

If the return variable can be optional check “Optional”, see Using Optional Arguments and Return Parameters for further information.

 

You have now provided all the information the wizard needs to generate the macro code.