sp_sign
Category: Spacing options Type: multiple (ignore add remove force) Default: remove
Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. Default: remove
raw CPP code | sp_sign=ignore | sp_sign=add | sp_sign=remove | sp_sign=force | space sp_sign=force |
---|---|---|---|---|---|
a=+b/-c; a=+ b/- c; a=+ b/- c; a=+b*+c; a=+ b*+ c; a=+ b*+ c; a=+*b; a=+ *b; a=+ *b; | a=+b/ -c; a=+ b/ - c; a=+ b/ - c; a=+b* +c; a=+ b* + c; a=+ b* + c; a=+*b; a=+ *b; a=+ *b; | a=+ b/ - c; a=+ b/ - c; a=+ b/ - c; a=+ b* + c; a=+ b* + c; a=+ b* + c; a=+ *b; a=+ *b; a=+ *b; | a=+b/ -c; a=+b/ -c; a=+b/ -c; a=+b* +c; a=+b* +c; a=+b* +c; a=+*b; a=+*b; a=+*b; | a=+ b/ - c; a=+ b/ - c; a=+ b/ - c; a=+ b* + c; a=+ b* + c; a=+ b* + c; a=+ *b; a=+ *b; a=+ *b; | a=+b/-c; a=+b/-c; a=+b/-c; a=+b*+c; a=+b*+c; a=+b*+c; a=+*b; a=+*b; a=+*b; |
Take care, default is 'remove' See also: sp_arith overrided by sp_arith_additive (for both the default is 'ignore') Edited by JEAYNE
raw CPP code | sp_sign=ignore | sp_sign=remove | space sp_sign=remove |
---|---|---|---|
//no space added a=b+c; a=b-c; a=b*c; a=b/c; a=b%c; a=b|c; a=b&c; a=b^c; a=b<<c; a=b>>c; //Why a space is added? a=b+-c; a=b-+c; a=b*+c; a=b/+c; a=b%+c; a=b|+c; a=b&+c; a=b^+c; a=b<<+c; a=b>>+c; | //no space added a=b+c; a=b-c; a=b*c; a=b/c; a=b%c; a=b|c; a=b&c; a=b^c; a=b<<c; a=b>>c; //Why a space is added? a=b+ -c; a=b- +c; a=b* +c; a=b/ +c; a=b% +c; a=b| +c; a=b& +c; a=b^+c; a=b<< +c; a=b>> +c; | //no space added a=b+c; a=b-c; a=b*c; a=b/c; a=b%c; a=b|c; a=b&c; a=b^c; a=b<<c; a=b>>c; //Why a space is added? a=b+ -c; a=b- +c; a=b* +c; a=b/ +c; a=b% +c; a=b| +c; a=b& +c; a=b^+c; a=b<< +c; a=b>> +c; | //no space added a=b+c; a=b-c; a=b*c; a=b/c; a=b%c; a=b|c; a=b&c; a=b^c; a=b<><<c; a=b>>c; //Why a space is added? a=b+-c; a=b-+c; a=b*+c; a=b/+c; a=b%+c; a=b|+c; a=b&+c; a=b^+c; a=b<><<+c; a=b>>+c; |
BUG: A space is added between operators{+ - * / % | & << >>} and signs{+|-} x=a/b; ==> x=a/b; OK x=a/+b; ==> x=a/ +b; BUG? The exception is the operator ^ x=a^+b; ==> x=a^+b; OK
TAGS: bug
Not the best code for this option? See how to improve the .uds file used to generate these examples.