align_var_def_amp_style
Category: Code alignment options (not left column spaces/tabs)
Type: numeric [0 .. 2]
Default: 0
How to consider (or treat) the '&' in the alignment of variable definitions. 0: Part of the type 'long & foo;' (default) 1: Part of the variable 'long &foo;' 2: Dangling 'long &foo;' Dangling: the '&' will not be taken into account when aligning.
| raw CPP code | align_var_def_amp_style=0 | align_var_def_amp_style=1 | align_var_def_amp_style=2 |
|---|---|---|---|
| /*-- 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.