sp_inside_sparen_open
Category: Spacing options Type: multiple (ignore add remove force) Default: ignore
Add or remove space after '(' of control statements other than 'for'. Overrides sp_inside_sparen.
raw CPP code | sp_inside_sparen_open=ignore | sp_inside_sparen_open=add | sp_inside_sparen_open=remove | sp_inside_sparen_open=force | space sp_inside_sparen_open=force |
---|---|---|---|---|---|
/*-- 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; } | /*-- 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 --*/ intmain(intargc,char**argv){ intn=0; if(arg>=1){ printf("Hello %s!\n",argv[1]); n=strlen(argv[1]); }else{ puts("Hello world!"); } returnn; } |
Not the best code for this option? See how to improve the .uds file used to generate these examples.