Interesting SWITCH statement problem

Here is a SWITCH statement in an ESP8266 program I've been working on:

     switch ( pktInBuffer[1] )
          case 0:  digitalWrite(SCLK,LOW);  //LED ON
          case 255: digitalWrite(SCLK,HIGH);  //LED OFF
              digitalWrite(SCLK,HIGH);  //LED OFF
              delay( pktInBuffer[1]  ); 
              digitalWrite(SCLK,LOW);   //ON -- normal state of the led

An eagle eyed reader will have spotted that I've mis-typed "default" here as "defalut".

Interestingly, this compiles without flagging and error for me, but the "defalut case" -- reasonably enough! -- is never executed. Took me a while to find the typo :slight_smile:

Is this a bug in the compiler's handling of the SWITCH statement, or something about the SWITCH statement that I haven't understood which allows "defalut" as a valid case?

It’s a perfectly cromulent word (goto tag…label…)

(I’m delighted to report you could equally have used “bollocks”)

cromulent (comparative more cromulent, superlative most cromulent) (humorous) Fine, acceptable or correct; seamless, relevant, legitimate or authentic; nonanomalous

Thanks Curt,
I've not made that particular silly mistake but if I had I think I too would have spent ages looking for it. I would have expected the compiler to object to it too.

++Karma; // For teaching me something new.