Itoo Software Forum

Author Topic: Arithmetic Select Function Request  (Read 1377 times)

Alex.S

  • Full Member
  • ***
  • Posts: 140
Arithmetic Select Function Request
« on: July 29, 2016, 11:58:31 AM »
One function that I'd find very useful, and save me from writing multiple nested if statements would a Select operand.

So you pass the variable in the first input, and then it selects from the following inputs based on that... We have similar operations for segments, but not for general arithmetic calculations. For example there are many circumstances I want slightly different offsets etc.

Thoughts?

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Arithmetic Select Function Request
« Reply #1 on: July 29, 2016, 12:35:53 PM »
Hi,

Thanks for the suggestion, I can see how this would be really useful. We'll add it to the wishlist. In the meantime here's a little code snippet you can quickly use with the Arithmetic operator. I'm afraid it's using the nested If statements you mention but you don't need more that 20 inputs you can just copy and paste this expression:

Code: [Select]
if(Input1=1,Input2,
if(Input1=2,Input3,
if(Input1=3,Input4,
if(Input1=4,Input5,
if(Input1=5,Input6,
if(Input1=6,Input7,
if(Input1=7,Input8,
if(Input1=8,Input9,
if(Input1=9,Input10,
if(Input1=10,Input11,0
))))))))))

Many thanks!

Paul
« Last Edit: August 02, 2016, 11:12:32 AM by Paul Roberts »
Paul Roberts
iToo Software

Alex.S

  • Full Member
  • ***
  • Posts: 140
Re: Arithmetic Select Function Request
« Reply #2 on: July 29, 2016, 01:00:23 PM »
Yup, cheers :)