Command function

The command function encapsulates other commands and actions and can be called by the command callfunction when needed. Functions are used to avoid code repetition.

Parameters

  1. name [string]
    Name given to the function that is used when the function is called.

Example


In the example above, the function double_value has been declared that encapsulates the command mathematicaloperation which doubles the value of the variable $(iNumber).

The command callfunction calls the function double_value.

To display the value of the variable $(iNumber), which is an integervariable, you need to convert your type to stringvariable using the command inttostring.