This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Please help baby C programmer...
- From: Ron Hudson <rhudson at cnonline dot net>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 27 Jan 2002 08:56:40 -0800
- 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.