PLUS+1 User Forum

PLUS+1™ Software => Code sharing => Topic started by: Cranes on November 25, 2012, 04:30:23 AM

Title: Table Lookup
Post by: Cranes 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
Title: Re: Table Lookup
Post by: ET 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.