Syntax for calling standard functions
- Last UpdatedJul 23, 2024
- 1 minute read
The syntax to call a predefined script function depends on whether and how the function returns a result.
Some functions do not return any result; some functions return an optional result that can be assigned to a tag or used in an expression; some functions return a result that must be assigned to a tag or used in an expression.
To determine the function type, look at the function description. Each function description has a syntax listing that shows whether the function returns a result and whether that result is optional.
Call a function that does not return a result
-
Use only the function name (and parameters, if any) in a statement. For example:
FunctionName(Parameters);
Call a function that requires its result to be assigned
-
Use the function name (and parameters, if any) anywhere in a script where you could use a literal value or a tagname of the relevant data type. For example, in a value assignment:
ResultsTagname = FunctionName(Parameters);
Or in a nested function call, using it as a parameter for another standard function:
OtherStandardFunction(FunctionName(Parameters));
Call a function that returns an optional result
-
Use either of the preceding procedures.