Octal numbers

21 May 2014

C allows an OCTAL number to be specified by putting a 0 before the number. For example 017 is decimal 15. The compiler handles this correctly.

However, the MBED development environment does not understand this construct. If you place the cursor at the end of 017 it sees it as decimal 17.

As an old PDP11 programmer I should have known better and not put 0 at the beginning of numbers to give a neat layout!

Jim Herd