Anyway, here's my dilemma. (spell checked and doesn't look right) :P
I'm trying to go through a string of bits flipping every other one. Like so:
Code: Select all
for i=1 to 7 step 2
if mid(t,i,1)="0" then t1=t1+"1"
if mid(t,i,1)="1" then t1=t1+"0"
Of course you see the problem. If the first condition is true then both lines get executed accomplishing nothing. I went through help looking for if/else formats trying every combination I can think of and keep getting "Else without If" errors. Can someone point me in the right direction? It's been several years and starting to enjoy this stuff again.