home  

nl_after_brace_open_cmt

Properties

  Category: Newline adding and removing options
      Type: boolean [false, true]
   Default: false

Description

Whether to add a newline between the open brace and a trailing single-line
comment. Requires nl_after_brace_open=true.

Examples

raw CPP code nl_after_brace_open_cmt=false nl_after_brace_open_cmt=true nl
nl_after_brace_open_cmt=true
/*-- this is the default sample --*/ int main(int argc, char** argv){ int n = 0; if(arg>=1){ printf("Hello %s!\n", argv[1]); n=strlen(argv[1]); }else{ puts("Hello world!"); } return n; } /*-- this is the default sample --*/ int main(int argc, char** argv){ int n = 0; if(arg>=1){ printf("Hello %s!\n", argv[1]); n=strlen(argv[1]); }else{ puts("Hello world!"); } return n; } /*-- this is the default sample --*/ int main(int argc, char** argv){ int n = 0; if(arg>=1){ printf("Hello %s!\n", argv[1]); n=strlen(argv[1]); }else{ puts("Hello world!"); } return n; } /*-- this is the default sample --*/ int main(int argc, char** argv){ int n = 0; if(arg>=1){ printf("Hello %s!\n", argv[1]); n=strlen(argv[1]); }else{ puts("Hello world!"); } return n; }
 

Not the best code for this option? See how to improve the .uds file used to generate these examples.