Standard Indentation etc.

Frank Swarbrick swarbric at tramp.Colorado.EDU
Fri Dec 16 09:14:58 AEST 1988


While we're on the subject, how about switch statements?  This is how I do
them:

switch(c)
{
   case 'a':
      statement1;
      statement2;
      break;
   /* more cases, etc... */
}

I do it this way even if I only have one statement.  I used to do it this way:

switch(c)
{
   case 'a':statement1;
            statement2;
            break;
   /* etc... */
}

But that shifted everything too far to the right, and I couldn't always get
the second statement exact by just using the tab key.  (ie, I had to do a few
tabs and then press space once or twice.)  (Note that I use a tab of three
spaces.)

Frank Swarbrick (and, yes, the net.cat)       University Of Colorado, Boulder
swarbric at tramp.Colorado.EDU          ...!{ncar|nbires}!boulder!tramp!swarbric
"Loneliness:  a constant friend and lover I know well" --Asia



More information about the Comp.lang.c mailing list