mrx23
- 2nd September 2006, 15:13
Hi!
How can I convert a binary array to a simple variable?
temp var bit[10]
temp2 var word
temp[0]=1
temp[1]=1
temp[2]=0
temp[3]=0
temp[4]=1
temp[5]=0
temp[6]=1
temp[7]=0
temp[8]=1
temp[9]=0
I want to temp2=%1100101010 (%0000001100101010)
I tried like this:
counter var byte
counter=0
Repeat
temp2.counter = temp[counter]
counter=counter+1
Until counter=10 '9+1
But its fails on temp2.counter.
Please help.
Thx
How can I convert a binary array to a simple variable?
temp var bit[10]
temp2 var word
temp[0]=1
temp[1]=1
temp[2]=0
temp[3]=0
temp[4]=1
temp[5]=0
temp[6]=1
temp[7]=0
temp[8]=1
temp[9]=0
I want to temp2=%1100101010 (%0000001100101010)
I tried like this:
counter var byte
counter=0
Repeat
temp2.counter = temp[counter]
counter=counter+1
Until counter=10 '9+1
But its fails on temp2.counter.
Please help.
Thx