Show Posts
Pages: 1 ... 38 39 [40]
586  Forum 2005-2010 (read only) / Bar Sport / Re: whats your twitter name? on: April 29, 2009, 06:25:35 pm
http://twitter.com/rene_bohne
but it is boring and has nothing to do with Arduino I guess
587  Forum 2005-2010 (read only) / Bar Sport / Re: int x; != int x=0; on: March 26, 2009, 08:36:23 pm
I would always initialize counter variables (in this case with a zero) unless this is a global variable, but even then it is a good idea.

And if you don't use or modify the variable inside the loop, then it is a good idea to make it volatile at some compiler optimization levels...

so in your case:
Code:
for (volatile int x=0; x<3; x++) {}

588  Forum 2005-2010 (read only) / Bar Sport / Re: int x; != int x=0; on: March 25, 2009, 10:12:54 pm
I am not sure if I understand your message.

int x;
outside of a function should be the same as
int x=0;
outside of a function. It might be that they are stored in different sections but this depends on the compiler and the compiler parameters.

Or was x a local variable of a function in your sketch?
Pages: 1 ... 38 39 [40]