Author Topic: indentation  (Read 3835 times)

Offline mastermatic

  • Multiple posting newcomer
  • *
  • Posts: 12
indentation
« on: November 20, 2007, 05:09:33 pm »
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

Offline mastermatic

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: indentation
« Reply #1 on: November 27, 2007, 06:46:12 pm »
Am I the only one with this problem?

José Barbosa

Offline mastermatic

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: indentation
« Reply #2 on: November 27, 2007, 07:15:01 pm »
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



Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: indentation
« Reply #3 on: November 28, 2007, 05:13:50 am »
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/