arduino - Byte Variable For Loop -


please me interpret for-loop:

for (byte color_bit = 23 ; color_bit != 255 ; color_bit--) {     ...do } 

i think understand (from googling & stackoverflow) 'color_bit' here unsigned variable. means loop count down 23 0. happens next? attempt start @ 255 , continue count down? because test "!= 255" stop?

in mind seems logic, tool i'm using (arduino ide) doesn't have debugger, can't step through code see values.

your loop see bit_color = 23..0 (24 iterations) provided 'byte' 8 bit unsigned. loop stops when color_bit=255. hth.


Comments