User forums > Help

astyle problem?

<< < (2/2)

Michael:
Hello,

I have tried with RC2 (Windows XP SP2) and Linux style issue is there. K&R seems to work quite ok. This is what I get when using K&R:


--- Quote ---namespace foospace
{                             <-- This is false
    int Foo() {
        if (isBar) {
            bar();
            return 1;
        } else /* difference */
            return 0;
    }
}

--- End quote ---

Java style has the same problem as K&R

I will check if this problem still exists with a SVN binary snapshot.

Michael

Michael:
I have tried now with C::B SVN rev1578 (from Therion), but it seems that there is another issue with K&R:


--- Quote ---namespace foospace
{                           <-- This is false
    int Foo() {
        if (isBar) {
            bar();
            return 1;
        }
        else /* difference */       <-- This is false
            return 0;
    }
}

--- End quote ---

With linux style same difference between code and linux style example in plugin settings.

Java style has the same problem as described in my previous post.

Michael

grv575:

--- Quote from: Michael on December 28, 2005, 07:55:03 pm ---I have tried now with C::B SVN rev1578 (from Therion), but it seems that there is another issue with K&R:


--- Quote ---namespace foospace
{                           <-- This is false
    int Foo() {
        if (isBar) {
            bar();
            return 1;
        }
        else /* difference */       <-- This is false
            return 0;
    }
}

--- End quote ---

With linux style same difference between code and linux style example in plugin settings.

Java style has the same problem as described in my previous post.

Michael


--- End quote ---

This:


--- Code: ---namespace foospace
{
    int Foo()
    {
        if (isBar) {
            bar();
            return 1;
        } else
            return 0;
    }
}

--- End code ---

is K&R - i.e. functions use the C bracket convention, while expressions use the java bracket convention.

Michael:

--- Quote from: grv575 on December 28, 2005, 10:23:12 pm ---This:


--- Code: ---namespace foospace
{
    int Foo()
    {
        if (isBar) {
            bar();
            return 1;
        } else
            return 0;
    }
}

--- End code ---

is K&R - i.e. functions use the C bracket convention, while expressions use the java bracket convention.

--- End quote ---

Thank you for the explanation, but the position of else is not correct (C::B SVN rev1578) or did I miss something?

Michael

Navigation

[0] Message Index

[*] Previous page

Go to full version