|
http://www.jindent.com |
Previous: Switch-Case Blocks
|
Next: Directives/Macros
|
| Blank lines before local variable declarations |

|
void method() { callMethod(); ¶ int a = 0; int b = 10; ... } |
|
void method() { callMethod(); int a = 0; int b = 10; ... } |
| Blank lines after local variable declarations |

|
void method() { int a = 0; int b = 10; ¶ callMethod(a, b); } |
|
void method() { int a = 0; int b = 10; callMethod(a, b); } |
| Blank lines after field declarations |

|
class MyClass { private int fieldA; private int fieldB; private String fieldC; ¶ ¶ void method() { ... } } |
|
class MyClass { private int fieldA; private int fieldB; private String fieldC; ¶ void method() { ... } } |
| Blank lines after class/struct and union declarations |

|
class MyClass { private int fieldA; ... } ¶ ¶ ¶ class MyOtherClass { ... } |
|
class MyClass { private int fieldA; ... } ¶ class MyOtherClass { ... } |
| Blank lines after constructor and destructor declarations |

|
class MyClass { MyClass() { ... } ¶ ¶ void method() { ... } } |
|
class MyClass { MyClass() { ... } ¶ void method() { ... } } |
| Blank lines after function declarations |

|
class MyClass { void methodA(int a, int b) { ... } ¶ ¶ void methodB() { ... } } |
|
class MyClass { void methodA(int a, int b) { ... } void methodB() { ... } } |
| Group empty functions for blank line insertion |

|
extern STATUS bootBpAnchorExtract (const char * string, char ** pAnchorAdrs); ¶ ¶ extern STATUS bootNetmaskExtract (const char * string, int * pNetmask); ¶ ¶ extern STATUS bootScanNum (const char ** ppString, int * pValue, BOOL hex); ¶ ¶ STATUS bootStructToString (const char * paramString, BOOT_PARAMS * pBootParams) { ... } ¶ ¶ typedef struct params { ... } |
|
extern STATUS bootBpAnchorExtract (const char * string, char ** pAnchorAdrs); extern STATUS bootNetmaskExtract (const char * string, int * pNetmask); extern STATUS bootScanNum (const char ** ppString, int * pValue, BOOL hex); ¶ ¶ STATUS bootStructToString (const char * paramString, BOOT_PARAMS * pBootParams) { ... } ¶ ¶ typedef struct params { ... } |
|
See also: | Blank lines after function declarations |
| Blank lines after enum declarations |

|
enum Coin { PENNY, NICKEL, DIME, QUARTER } ¶ ¶ Coin myCoin = PENNY; |
|
enum Coin { PENNY, NICKEL, DIME, QUARTER } ¶ Coin myCoin = penny; |
| Blank lines after member declaration groups |

|
class Test { public: int a; int b; ¶ ¶ private: int x; int y; }; |
|
class Test { public: int a; int b; ¶ private: int x; int y; }; |
| Blank lines after using declarations |

|
using std::cout; using std::endl; ¶ ¶ class Test { ... } |
|
using std::cout; using std::endl; ¶ class Test { ... } |
| Blank lines after blocks of linkage specifications |

|
extern "C" { ... } ¶ ¶ void method() { ... } |
|
extern "C" { ... } ¶ void method() { ... } |