Author Topic: Table Lookup  (Read 5471 times)

Cranes

  • Guest
Table Lookup
« on: November 25, 2012, 04:30:23 AM »
Hello,
 
Is there a way to use arrays for table lookup? I have a calculated value that falls between value 0 through 15. I need to determine the closest >= value and output a constant related to that number. Actually I would have five tables and it would determine which table to look at based on an input parameter.

Thanks
Jeff

ET

  • Guest
Re: Table Lookup
« Reply #1 on: December 14, 2012, 05:48:28 PM »
Yes.
Use the 0-15 value to pick an item from each of your arrays, then use a switch to choose which of those you're actually using.
Example attached.