Darrel something is not going in my head.
Code:Value = 01389 ' <- Is the "0" really included ?
Darrel something is not going in my head.
Code:Value = 01389 ' <- Is the "0" really included ?
The compiler will ignore any leading 0's.
That's the way Tcbcats showed it, so I left it in there.
<br>
DT
@Darrel
i mean this line.
I don´t tried it out, maybe it worksCode:For DigLoop = 5 to 1 STEP -2 Buf((6-DigLoop)/2) ' = Buf((6-5)/2) = 0.5 ??? Does it really works? Round it to zero? Next DigLoop
Sure it works.
But PBP uses integer math. So there are no decimals.
With STEP -2 the loop will execute 3 times, with the values 5, 3, 1 in DigLoop.
Since it's Integer math, (6-DigLoop)/2 will return 0, 1 and 2 respectively.
hth,Code:loop Buf((6-DigLoop)/2) = ((Value DIG DigLoop) << 4) + Value DIG (DigLoop -1) 5 BUF( 0 ) = ( $00 ) + 0 = $00 3 BUF( 1 ) = ( $10 ) + 3 = $13 1 BUF( 2 ) = ( $80 ) + 9 = $89
DT
Bookmarks