We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Something strange on writing syntax array.
Page Index Toggle Pages: 1
Something strange on writing syntax array. (Read 288 times)
Something strange on writing syntax array.
Aug 4th, 2009, 7:37am
 
Something strange in the syntax, why this don't work :

int[][] matriceMap = {
     {01,02,03,04,05},
     {06,07,08,09,10},
     {11,12,13,14,15},
     {16,17,18,19,20},
     {21,22,23,24,25}
};

And this work :

int[][] matriceMap = {
     {01,02,03,04,05},
     {06,07,8,9,10},
     {11,12,13,14,15},
     {16,17,18,19,20},
     {21,22,23,24,25}
};

And the only difference it's just remplace '09' by '9', and '08' by '8'...

Thank you very munch for you help.

Re: Something strange on writing syntax array.
Reply #1 - Aug 4th, 2009, 7:40am
 
Numbers starting with 0 are octal numbers (base 8), an odd old legacy from the C language...
Re: Something strange on writing syntax array.
Reply #2 - Aug 4th, 2009, 7:45am
 
ok, thank you very munch.

Smiley
Page Index Toggle Pages: 1