You can pass parameters to an entry macro. The system translates these parameters to the correct data type.
![]() |
Note: The env.argv array is separate from this feature and still functions as designed. In other words, the env.argv array continues to pass parameters as text strings. To use env.argv array values for subsequent numeric operations, you must first convert the values to a number by using the env.atoi(string) command. |
Example
The following macro (saved as m.mac) uses values specified in a CLI command to compute the final result:
- <# m(left,right,third) #>
- <# multi := left * right #>
- <# multiFinal := multi * third #>
- <# setoutput console #>
- <# “ The result is: multiFinal; “ \n”
#>
- <# endsetoutput #>
- <# endtmpl #>
The following example provides the output from using this macro:
- host1#macro m.mac m 5 6 7
- host1#The result is: 210