News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

indentation

Started by mastermatic, November 20, 2007, 05:09:33 PM

Previous topic - Next topic

mastermatic

When formating the source code , using the 'source code formatter (AStyle) ' plugin, the indentation after a colon ( in a case(): ) puts for example 4 tabs instead of 4 spaces.
The thing comes like this:

    case SIGNAL(ID_NUMTEC_5, PSF_CLICKED):
                    if (digit<MAXCALDIGIT)                    <<<<<<<<<<<< here!!
            {

Can it be corrected?

Best Regards
José Barbosa

mastermatic

Am I the only one with this problem?

José Barbosa

mastermatic

just to clarify, here comes 5 examples:

*Note the indentation when the  -  if   -  comes just after the colon.

//----------------------------------
case (something):
            if (anything) DoNothing();
break;

//----------------------------------
case (something):
            if (anything)
    {
        DoNothing();
    }
break;

//-----------------------------------
case (something):
{
    if (anything) DoNothing();
}
break;
//-----------------------------------
case something:
DoNothing();                        // <<<<<---- and this?
break;
//-----------------------------------
case something:
{
    DoNothing();
}
break;
//-----------------------------------

Best Regards
José Barbosa



Ceniza

The AStyle plugin relies on AStyle. Any bug you find in it should be reported to the AStyle developers. The project's website is http://astyle.sf.net/