What do you mean with octal? And code which contains
if(pin == 03)
He is asking (yet not explaining why
he is asking for the uninitiated) why you are using an octal (base 8 ) value. This is because standard C syntax states that any numeric values that start with a zero which is not followed by an 'x' or a 'b' is interpreted as octal. In your case it really doesn't matter that much (but can lead to a bad habit) because the actual value is less than 8, but if you had 011
then that would equate to 9 in decimal, so 011 + 03
would equal 12 (in decimal), not 15. It's not quite defined (meaning different compilers may handle it differently) what would happen if you used 08
. Some compilers may choke on this seemingly inexplicably unless one is familiar with octal notation, and others may assume that the coder really meant decimal and not mention the possible bad interactions if the bad habit isn't corrected.
(Too bad octal notation hasn't been depreciated into oblivion. It's use is such a special case now that most people group binary into sets of 4 bits instead of sets of 3 bits.)