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.

Examples

Code Returns
$(nth,0,eni,meni,mini,mo) eni
$(nth,1,eni,meni,mini,mo) meni
$(nth,3,eni,meni,mini,mo) mo
$(nth,3,$(+,100,0),$(+,100,1),$(+,100,2),$(+,100,3)) 103

 

See also...

$(index, which, string)

DIESEL functions


© Bricsys NV. All rights reserved.