Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By xtal
#88376
Code: Select allint DowQ[21][12] = {  { 1,11,20, 9,22,25, 10,33,30, 11,44,35 },
                      { 1,11,20, 13,22,25, 14,33,30, 15,44,35 },
                      { 1,11,20, 17,22,25, 18,33,30, 19,44,35 },
                     
                      { 2,11,20, 21,22,25, 22,33,30, 23,44,35 },
                      { 2,11,20, 13,22,25, 14,33,30, 15,44,35 },
                      { 2,11,20, 17,22,25, 18,33,30, 19,44,35 },
                     
                      { 3,11,20, 1,22,25, 2,33,30, 3,44,35 },
                      { 3,11,20, 5,22,25, 6,33,30, 7,44,35 },
                      { 3,11,20, 9,22,25, 10,33,30, 11,44,35 },
                     
                      { 4,11,20, 9,22,25, 10,33,30, 11,44,35 },
                      { 4,11,20, 13,22,25, 14,33,30, 15,44,35 },
                      { 4,11,20, 17,22,25, 18,33,30, 19,44,35 },
                     
                      { 5,11,20, 9,22,25, 10,33,30, 11,44,35 },
                      { 5,11,20, 13,22,25, 14,33,30, 15,44,35 },
                      { 5,11,20, 17,22,25, 18,33,30, 19,44,35 },

                      { 6,11,20, 9,22,25, 10,33,30, 11,44,35 },
                      { 6,11,20, 13,22,25, 14,33,30, 15,44,35 },
                      { 6,11,20, 17,22,25, 18,33,30, 19,44,35 },

                      { 7,11,20, 3,22,25, 6,33,30, 11,05,25 },
                      { 7,11,20, 4,22,25, 7,33,30, 10,41,25 },
                      { 7,11,20, 5,22,25, 8,33,30, 11,44,35 }           
} ;



If I add leading 0 to the single digit #'s all is ok until I encounter 8 or 9 then get

TH-loop-ASYNC-A55:35:34: error: invalid digit "9" in octal constant

int DowQ[21][12] = { { 1,11,20, 09,22,25, 10,33,30, 11,44,35 },
^
exit status 1
invalid digit "9" in octal constant


Am I doing something wrong or is this a bug ??????? V 1.8.12
Wemos D1 / R1
User avatar
By AcmeUK
#88380
Am I doing something wrong

OCTAL a system of numerical notation that has 8 rather than 10 as a base!

So digits 0...7 are valid.
Digits 8 and above gives Octal invalid digit error.
User avatar
By xtal
#88385 So is this a C-standard that starting with 0 implies octal, or is this an Arduino thing... And do all vars act the same...? Apparently so, I just tried int XYZ = 09; and get octal error, personally I think this is silly...

thx