User forums > Using Code::Blocks

indentation

(1/1)

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/

Navigation

[0] Message Index

Go to full version