Page 1 of 1

Change switch output/input

Posted: 04 Mar 2014 18:42
by newtfish
Hi,

Im wondering if its possible to change the output/input of a switch.

At the moment it does something like:

0. 0. 0. 1. 0. 0. 0.

Is there any way to get it to output?

4

Instead of this long list?

Re: Change switch output/input

Posted: 04 Mar 2014 18:58
by oldgearguy
look at firstof(x) and nonnull(x) functions in the User Guide. They may get you what you want, depending on the context and what exactly you want to do with the value.

Re: Change switch output/input

Posted: 04 Mar 2014 19:06
by newtfish
Thanks.

The firstof function does indeed change the output of the Switch.

However, im wondering is there any way to send the input in this format?

e.g.

"/Switch/x 4."