[Answered, thanks] Leaving the () of a function call


i accidentally left () off function call, typing:

code: [select]
pulseled;
// instead of
pulseled();


needless didn't call void pulseled(), of course did after noticed , put () in.

but i'm confused why compiled.....

the name of function pointer location a.k.a. address of function.
it compiles addresses of function may occur on right hand side (rhs) of expression.

you have same "problem" with

void setup()
{
  int x;
  x;
}




Arduino Forum > Using Arduino > Programming Questions > [Answered, thanks] Leaving the () of a function call


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code