sp_after_semi_for
Category: Spacing options Type: multiple (ignore add remove force) Default: force
Add or remove space after ';' in non-empty 'for' statements. Default: force
for(i=0;i<9;i++)
raw CPP code | sp_after_semi_for=ignore | sp_after_semi_for=add | sp_after_semi_for=remove | sp_after_semi_for=force | space sp_after_semi_for=force |
---|---|---|---|---|---|
void f(){ for(i=0;i<9;i++)x++; for(j=0 ; j<9 ; j++)y++; for(k=0;k<9;k++)z++; } | void f(){ for(i=0;i<9;i++)x++; for(j=0 ; j<9 ; j++)y++; for(k=0;k<9;k++) z++; } | void f(){ for(i=0; i<9; i++)x++; for(j=0 ; j<9 ; j++)y++; for(k=0; k<9; k++) z++; } | void f(){ for(i=0;i<9;i++)x++; for(j=0 ;j<9 ;j++) y++; for(k=0;k<9;k++) z++; } | void f(){ for(i=0; i<9; i++)x++; for(j=0 ; j<9 ; j++) y++; for(k=0; k<9; k++) z++; } | voidf(){ for(i=0;i<><9;i++)x++; for(j=0;j<><9;j++)y++; for(k=0;k<><9;k++)z++; } |
Take care: the default is 'force'. See also: sp_after_semi_for_empty. Notes: - The option 'sp_before_semi_for' doesn't exist. Why? The option sp_before_semi (default to 'remove') as no effect here. Why? BUG? - When spaces are deleted the position of the 'y++' is unmodifier (like for comments), BUG? - Why a space is added before 'z++' but not before 'x++' or 'y++', BUG. Edited by JEAYNE
Not the best code for this option? See how to improve the .uds file used to generate these examples.