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.

 

Examples

Code Returns
$(getvar,lastpoint) 420.5,594.4,0.0
$(index,0,$(getvar,lastpoint)) 420.5
$(index,1,$(getvar,lastpoint)) 594.4
$(index,2,$(getvar,lastpoint)) 0.0

See also...

$(nth, which, string)

DIESEL functions
© Bricsys NV. All rights reserved.