title: Storing value of switch case into a variable
body: <p>I want to store the value from switch case to a variable. The following is the part of that Arduino code.</p>
  
  <pre><code>switch(i){
           case 0 :Serial.print("Time in UTC (HhMmSs): ");break;
           case 1 :Serial.print("Status (A=OK,V=KO): ");break;
           case 2 :Serial.print("Latitude: ");break;
           case 3 :Serial.print("Direction (N/S): ");break;
           case 4 :Serial.print("Longitude: ");break;
           case 5 :Serial.print("Direction (E/W): ");break;
           case 6 :Serial.print("Velocity in knots: ");break;
           case 7 :Serial.print("Heading in degrees: ");break;
           case 8 :Serial.print("Date UTC (DdMmAa): ");break;
           case 9 :Serial.print("Magnetic degrees: ");break;
           case 10 :Serial.print("(E/W): ");break;
           case 11 :Serial.print("Mode: ");break;
           case 12 :Serial.print("Checksum: ");break;
         }
  </code></pre>
  
  <p>I don't want to print the value of case 0 as it does now, but I want to store the value of case 0 into a variable. Please help me. </p>