It is possible for functions to have no parameters at all such as the YLoc function in the previous example. This function returns the current Y coordinate of the mouse cursor on the screen and therefore does not depend upon any value. For functions with no parameters, the empty parentheses following the name may be omitted while retaining exactly the same meaning.
Note: While you may omit the empty parentheses without affecting the function's operation, it is good programming practice to always include them as a matter of style.
Functions may be used as parameters for other functions. These functions may then be used in other expressions, etc. There is no limit on the level to which functions and operators may be nested and combined, however you should strive for clarity by limiting the level of nesting. Every variable and constant in an expression must be contained within no more than ten pairs of parentheses. This is a limitation imposed by available memory. The following are examples of functions nested within functions :
Sin(Sqrt(X) * 5);
Limit(Cos(X / 180), 0, Log(Sin(X / 180) + 2) + 1);
In general, a particular function has a fixed number of parameters. The order in which the parameters are listed is significant since VTS interprets the meaning of each parameter according to its position in the list.
Some functions may have optional parameters that may be entered or omitted at the user's discretion. In the function listings, later in this guide, optional parameters are enclosed in square brackets ( [ ] ).
Some functions have the property that once their value is set, it does not change, regardless of what changes may occur in the original parameters. It may be appropriate to reset these functions at certain times; this occurs both automatically (see the section on Automatically Reset Functions) and by using the function ResetParm.