2012

Table Of Contents
getvar
Returns the value of the system variable with the given varname.
$(getvar, varname)
if
Conditionally evaluates expressions.
$(if, expr, dotrue [, dofalse])
If expr is nonzero, it evaluates and returns dotrue. Otherwise, it evaluates and
returns dofalse. Note that the branch not chosen by expr is not evaluated.
index
Returns the specified member of a comma-delimited string.
$(index, which, string)
Assumes that the string argument contains one or more values delimited by
the macro argument separator character, the comma. The which argument
selects one of these values to be extracted, with the first item numbered 0.
This function is most frequently used to extract X, Y, or Z coordinate values
from point coordinates returned by $(getvar).
Applications can use this function to retrieve values stored as comma-delimited
strings from the USERS1-5 system variables.
nth
Evaluates and returns the argument selected by which.
$(nth, which, arg0 [, arg1,, arg7])
If which is 0, nth returns arg0, and so on. Note the difference between $(nth)
and $(index); $(nth)returns one of a series of arguments to the function, while
$(index) extracts a value from a comma-delimited string passed as a single
argument. Arguments not selected by which are not evaluated.
70 | Chapter 5 DIESEL