Syntax Error on an ELSEIF statement

jon_nic

New Member
Hi can someone assist with this sytax error? i cant see the error but i cant pass the syntax check on line 23 the elseif statement says theres an error but gives me no hint.
I am trying to do a string of IF statements, checking the value of B1 and changing the DAC according to the Value in B1, i think i am correct but syntax check say NO!

what am i doing wrong?
thanks for help!
24402
 

johnlong

Senior Member
Hi
you need to write it as " b1 >=199 and b1 <= 207 then
other wise it does not know which condition to check
regards
john
 

jon_nic

New Member
Excellent John thank you, have just corrected it and now works. My stupid mistake not being explicit enough on the logic condition

thanks!
Hi
you need to write it as " b1 >=199 and b1 <= 207 then
other wise it does not know which condition to check
regards
john
 

johnlong

Senior Member
Hi jon
done a little test rig for you to look at for the select case
Code:
b1=210
do
inc b1
select case b1
case 212 to 220
    'daclevel 1
    low b.6
    high b.7
    sertxd("high B7"," b1 =",#b1,cr,lf)
case 221 to 227
    'daclevel 2
    low b.7
    high b.6
    sertxd("high B6"," b1 =",#b1,cr,lf)
else low b.7,b.6
    sertxd("low B7 B6"," b1 =",#b1,cr,lf)
end select 
pause 1000
loop
hope this helps you out
regards john
 
Top