Step 2 collects details on all the arguments (or input parameters) which can
be passed to the macro. Up to 10
parameters can be passed to the macro.
Each parameter must have a name, a destination variable and a data
type.
It is not mandatory
for a macro to have arguments although it would be unusual not to have at least
one argument.
The Argument name
should describe the parameter which is being passed, check “Optional” if the parameter is not a
mandatory parameter. See Using Optional Arguments and
Return Parameters for further information.
(Note – Mandatory arguments must come
before optional parameters. Once an
optional argument has been entered any argument entered after the optional
argument must also be optional).
The Destination is a variable or PIC
register name. Click on Get Vars and the destination drop down
will be populated with all the Variable names used in the current active
project in the IDE. You can choose a
variable from this list or add a new variable name.
Choose the Data Type for the variable being
passed. If you want the macro to accept
alternative compatible data types check “Allow
Alt”. For more information on
alternative data types see, Using
Alternative Data Types.
When you have
completed these 3 fields click on “Add”
to add that argument to the list of input arguments.
Repeat Step 2 for
each argument. You can move back and
forward between arguments by clicking <<
and >> to move back and
forward between entered arguments.
Delete will remove the current argument from the argument list and all
Arguments will be renumbered.