PDA

View Full Version : Lookup



actionplus
- 27th November 2004, 06:45
Anyone familiar with LookUp command?
here is what my problem is. I have large data to look up. About 200 points of data.
Here is a small portion of it.

LookUp adval["55,55.2,55.4,55.6,55.8,56,56.2,56.4,56.6,56.8,57,5 7.2,57.4
,57.6,57.8,58,58.2,58.4,58.6,58.8,59,59.2,59.4,59. 6,59.8,60,60.2,60.4,60.6,60.8,61,61.2,61.4,61.6,61 .8,62,62.2,62.4,62.6,62.8,63,63.2,63.4,63.6,63.8"],point

Now the problem is that it compiles fine if I have only 1 line of data like this.

LookUp adval,["55,55.2,55.4,55.6,55.8,56,56.2,56.4,56.6"],point

How can I keep continuing to the next line and so forth like the first example from above?

Santana
- 27th November 2004, 14:11
DO something Like This
LookUp adval[55,55.2,55.4,55.6,55.8,56,56.2,56.4,56.6,56.8,57,5 7.2,57.4,_
63.4,63.6,63.8],point

actionplus
- 28th November 2004, 23:01
Still giving an error message.
says it is expecting "]"

actionplus
- 28th November 2004, 23:25
seem like the lookup table cannot contain any decimel points. Once I took of the decimals, it errors disappeared.

Now, how can replace the decimal back into the lcdout command

550 is suppose to be 55.0

And

2000 is 200.0

mister_e
- 28th November 2004, 23:38
never us any LOOKUP but

LookUp adval,["55,55.2,55.4,55.6",_
"55.8,56,56.2,56.4,56.6,56.8,57",_
"57.2,57.4,57.6,57.8,58,58.2,58.4,58.6,58.8,59,59.2",_
"59.4,59.6,59.8,60,60.2,60.4,60.6,60.8,61,61.2,61.4",_
"61.6,61.8,62,62.2,62.4,62.6,62.8,63,63.2,63.4,63.6 ,63.8"],point

dont return any errors


let me know

Ingvar
- 29th November 2004, 09:06
Hi Actionplus,

It seems like you discovered that PBP cannot handle decimal numbers.

If you want to diplay your data with a decimal you could write ...

LCDOUT "Data = ", DEC data/10, ".", DEC1 data

.... or, if you want a little more control over each digit .....

LCDOUT "Data = ", DEC1 data DIG 4, DEC1 data DIG 3, DEC1 data DIG 2, DEC1 data DIG 1, ".", DEC1 data DIG 0

/Ingvar