mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
Improved bracket info.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6319 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1b3fe71e27
commit
5b5de09bfb
1 changed files with 6 additions and 14 deletions
|
@ -134,25 +134,17 @@ x++, y++;
|
|||
@end example
|
||||
|
||||
Brackets should have space only before the leading bracket and after
|
||||
the trailing bracket (as in this example).
|
||||
the trailing bracket (as in this example), though there are odd occasions
|
||||
where those spcaes might be omitted ((eg. when brackets are doubled)).
|
||||
This applies to square brackets too.
|
||||
|
||||
Where round brackets are used specially (type-casts and function/macro calls)
|
||||
different rules may be applied.
|
||||
|
||||
For brackets in function and macro calls or specifications, there is normally
|
||||
no space between the function/macro name and the opening bracket -
|
||||
@example
|
||||
a = AMACRO();
|
||||
b = aFunctionCallWithArguments(c, d);
|
||||
@end example
|
||||
|
||||
For type-casts and specification of method argument types, there is normally
|
||||
no space between the closing bracket and the expression whose type is being
|
||||
specified -
|
||||
Where round brackets are used for type-casts or at the end of a statement,
|
||||
there is normally no space between the closing bracket and the following
|
||||
expression or semicolon-
|
||||
@example
|
||||
a = (int)b;
|
||||
- (void) methodWithArg1: (int)arg1 andArg2: (float)arg2;
|
||||
a = foo (ax, y, z);
|
||||
@end example
|
||||
|
||||
The placement of curly brackets is part of the indentation rules. the
|
||||
|
|
Loading…
Reference in a new issue