Please help baby C programmer...

Stephano Mariani sk.mail@btinternet.com
Sun Jan 27 16:28:00 GMT 2002


 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes!

Stephano Mariani

- -----Original Message-----
From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On Behalf
Of Ron Hudson
Sent: Sunday, 27 January 2002 4 57
To: gcc@gcc.gnu.org
Subject: Please help baby C programmer...

I am having trouble with the switch / case statement.

In my program I have a nested case statement.

switch (a){
    case 1:
        switch (b){
           case 1:
               statement1
               break;
           case 2
               statement 2
               break;
          }/* close switch b */
    case 2:
         switch (b){
            case 1:
               statement 1
               break;
            case 2:
               statement 2
               break;
          } /* close switch b*/

  }/* close switch a */

- ---------
Is is OK to nest switch statements?

Thanks.


-----BEGIN PGP SIGNATURE-----
Version: PGP 7.1.1
Comment: Use PGP or GNUPG

iQA/AwUBPFQ0nGgk66Ms+o9zEQJN2ACdGlHK8OszVpZLlH0aSUruHGGo1E4Anizx
EJSB0jEukzIDUOGMxtacMdF0
=yM/1
-----END PGP SIGNATURE-----




More information about the Gcc mailing list