I have searched the forum for more explanation of how the lookup functions work but my very simple test code fails to give me the expected result.
main:
let b0=99 'to simulate readadc result
let b1=6 'to ensure b1 has an initial value
lookup b0,(98,99,100,101),b1 'place value in b1
debug b1 'show value held in b1
pause 500
goto main 'repeat
I expected b1 to read 1 in debug but lookup fails to change the value held from its initial setting of 6. Where am I going wrong please?
Peter
ps Is there a way of preventing this forum's posts from showing all " marks as ": Is this a browser issue?
main:
let b0=99 'to simulate readadc result
let b1=6 'to ensure b1 has an initial value
lookup b0,(98,99,100,101),b1 'place value in b1
debug b1 'show value held in b1
pause 500
goto main 'repeat
I expected b1 to read 1 in debug but lookup fails to change the value held from its initial setting of 6. Where am I going wrong please?
Peter
ps Is there a way of preventing this forum's posts from showing all " marks as ": Is this a browser issue?
Last edited: