Contents   Index   Previous   Next



Parameters

After the macro name you can also add parameters to the macro.

You can then refer to those parameters in the macro text as §p x§, where x stands for the number of the parameter.

Example:

If you have a macro definition for a macro ‚loop‘:

§p 1§ loopvar, endvar

endvar =       // fill end value

FOR loopvar = 1 TO endvar

   // fill loop script

NEXT

If you call it with ‚loop ulong‘, SmartPaste produces

ulong loopvar, endvar

endvar =       // fill end value

FOR loopvar = 1 TO endvar

   // fill loop script

NEXT

Calling it with ‚loop integer‘ would produce

integer loopvar, endvar

endvar =       // fill end value

FOR loopvar = 1 TO endvar

   // fill loop script

NEXT

You can refer to the parameters in the macro as many times as you like. You can have any number of parameters to a macro.