Originally Posted by
joecar
x is the "lookup" index pid.
a1,a2 -> when you lookup a1, you get back a2
b1,b2 -> when you lookup b1, you get back b2
c1,c2 -> when you lookup c1, you get back c2
d1,d2
e1,e2
.....,....
x1,x2
.....,....
a1,b1,c1,d1,e1,f1,...x1,... must be in ascending order
lookup() compares x to each of a1,b1,c1,d1,... it stops when it finds the matching/exceeding value;
Example:
lookup({GM.RPM}, 1000,1, 2000,2, 3000,3, 4000,4, 5000,5, 6000,6)
if {GM.RPM} is 3000, then lookup returns 3.
if {GM.RPM} is 4500, then lookup returns 4 (or actually 4.5... I think it interpolates).