User`s manual

Passing parameters to macros
ModelSim Xilinx Users Manual Tips and Techniques C-291
Passing parameters to macros
In ModelSim, you invoke macros with the do command:
Syntax
do
<filename> [ <parameter_value> ...]
Arguments
<filename>
Specifies the name of the macro file to be executed.
<parameter_value>
Specifies values that are to be passed to the corresponding parameters $1 through $9 in the
macro file. Multiple parameter values must be separated by spaces. If you specify fewer
parameter values than the number of parameters used in the macro, the unspecified values
are treated as empty strings in the macro.
There is no limit on the number of parameters that can be passed to macros, but
only nine values are visible at one time. You can use the shift command
(CR-90)
to see the other parameters.
See also
The do command
(CR-43) for more information on do files.