User forums > Help
astyle problem?
liuyg:
I would like to use KR style with astyle tool, but I find this in astyle of plugin's settings of settings:
--- Code: ---namespace foospace {
int Foo() {
if (isBar) {
bar();
return 1;
}
else --------------------????? It's very stranger. It is not KR style
return 0;
}
}
--- End code ---
KR style should be :
--- Code: --- namespace foospace {
int Foo() {
if (isBar) {
bar();
return 1;
} else ---- this
return 0;
}
}
--- End code ---
mandrav:
These examples were copied verbatim from astyle's documentation.
Have you tried formatting with this style and behaves wrong?
In other words, is the sample wrong or the behaviour?
liuyg:
HI,
Thanks for your reply.
The astyle sample in codeblocks is wrong. I have checked astyle document. It should be '}else' .
mandrav:
Thanks, I 'll correct it :)
m00:
Same problem as with Linux style; it's not right. In the astyle document shows:
http://cvs.sourceforge.net/viewcvs.py/*checkout*/astyle/astyle_1.x/astyle.html?rev=1.28
--- Code: ---namespace foospace
{
int Foo()
{
if (isBar) {
bar();
return 1;
} else /* difference */
return 0;
}
}
--- End code ---
But in C::B 1.0r2 has this:
--- Code: ---namespace foospace
{
int Foo()
{
if (isBar) {
bar();
return 1;
}
else /* difference */
return 0;
}
}
--- End code ---
K&R style problem still exist in C::B 1.0r2. I have no idea if it's arleady fixed in SVN, so just a FYI.
Navigation
[0] Message Index
[#] Next page
Go to full version