I am trying to set individual bits of a word to correspond to the state of input pins so that I can test the word as a decimal value. Here is a snipet of the code.

dip var byte
input porta.1
input porta.2
input porta.3

dip.0 = porta.1
dip.1 = porta.2
dip.2 = porta.3

if dip = 0 then
high portb.0
enif
if dip = 1 then
high portb.1
endif
...etc.

I've also tried to use Select Case instead of the If thens. If anyone sees something I'm doing wrong, any help would be greatly appreciated. Thanks in advance.