while statement


i copy/paste following code , compiler tells me 'stanby' not declared in scope
i run original code copied , it's ok (?)
can tell me what's happening...

my code:
  void loop() {
     while (pind = 0) {
      stanby(); }

  void stanby() {
    portb = 0;
      }

you should post of code. didn't include 'setup()' function.

in you've shown, left closing curly bracket off 'loop()' function. if add empty 'setup()', plus add missing } @ end of 'loop()', code compiles fine.

edit: 1 more thing spotted.
this:-
code: [select]
while (pind = 0)should this:-
code: [select]
while (pind == 0)


Arduino Forum > Using Arduino > Programming Questions > while statement


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'