User forums > Help

Is astyle supposed to touch comment (/* */)?

<< < (3/3)

rickg22:
I think this is the way of initializing C Arrays.

char[25] mychars = {1,2,3,4,5, (etc) }; And that's very different from functions.

Michael:

--- Quote from: rickg22 on January 03, 2006, 08:23:27 pm ---I think this is the way of initializing C Arrays.

char[25] mychars = {1,2,3,4,5, (etc) }; And that's very different from functions.

--- End quote ---

Yes, you are right :). I have tried your array with ANSI style and got:


--- Code: ---char[25] mychars =
    {
        1,2,3,4,5
    };

--- End code ---

I suppose that this is not what you would like to have.

Michael

royalbox:
There are two options in the aStyle plugin configuration:


--- Quote ---Don't break complex statements and multiple statements residing in a single line
--- End quote ---
and

--- Quote ---Don't break one line blocks
--- End quote ---

which don't seem to do anything.

Let's say you have a class with several methods like this:


--- Code: ---        int GetHeight() const {return cy;}
        int GetWidth() const {return cx;}
        int GetX() const {return x;}
        int GetY() const {return y;}

--- End code ---
Even with both the above options checked, when you run aStyle you get this:

--- Code: ---        int GetHeight() const
        {
            return cy;
        }
        int GetWidth() const
        {
            return cx;
        }
        int GetX() const
        {
            return x;
        }
        int GetY() const
        {
            return y;
        }

--- End code ---

What are these options for if not for this?

Many thanks.

Navigation

[0] Message Index

[*] Previous page

Go to full version