Using or statements within switch statements

Mecatronicsstudent:
The problem is that it gives me an error of duplicate case value. Is it not possible to use or statements within a switch statement like this.

case
'a'|| 'A' :
Serial.println ('a');
dot();
dash();
letterspace();
break;

What you want to do is something like this

switch (var) {
    case 'a':
    case 'A':
      //do something when var equals a/A
      break;
    case 'b':
    case 'B':
      //do something when var equals b/B
      break;
    default: 
      // if nothing else matches, do the default
      // default is optional
  }

Of course what you should really do is study the code that was posted in your other thread by liudr.

Hope this helps,

Brad.