Keypad/While loop

  i = 0;
  while(! i)
  {
    char pound = 0;
    while(! pound){
      delay(10);
      pound = kpd.getKey();
    }
    if(pound == '#'){
      i = 1;
    }
    else{
      pound = 0;
    }
  }

I am using the keypad library. Elsewhere in my code, the keypad works fine. But at this point, the program will not proceed when the pound key is pushed. Or when any key is pushed. Is there anything wrong with my code? Or any misunderstanding of variable types, perhaps?

Thanks.

Is there anything wrong with my code?

Yes. It is missing Serial.print() statements to tell you what it is doing.

Why are you using i like it was a bool? Is there something wrong with explicitly comparing i to 0?

PaulS:
Yes. It is missing Serial.print() statements to tell you what it is doing.

Yep. And after doing so, I found that I had switched # and * in my keypad setup...

PaulS:
Why are you using i like it was a bool? Is there something wrong with explicitly comparing i to 0?

I don't know, I had just gotten into a habit of that lately. Bad practice?

Yep. And after doing so, I found that I had switched # and * in my keypad setup...

Damned them fat fingers!

Bad practice?

I don't like implicit tests, when a few extra keystrokes makes it clear. Never have gotten into that habit, so I still have to stop and think about the code. while(i == 0) takes no such pondering. But, it's just me, so don't let it bother you if you are comfortable with the while(!i) form.