version 1.7, 2022/04/22 21:21:20 |
version 1.8, 2022/04/24 09:04:12 |
|
|
* continued statements. |
* continued statements. |
*/ |
*/ |
|
|
#indent input |
//indent input |
bool |
bool |
less(int a, int b) |
less(int a, int b) |
{ |
{ |
Line 23 less(int a, int b) |
|
Line 23 less(int a, int b) |
|
b) |
b) |
return true; |
return true; |
} |
} |
#indent end |
//indent end |
|
|
#indent run -eei |
//indent run -eei |
bool |
bool |
less(int a, int b) |
less(int a, int b) |
{ |
{ |
Line 37 less(int a, int b) |
|
Line 37 less(int a, int b) |
|
b) |
b) |
return true; |
return true; |
} |
} |
#indent end |
//indent end |
|
|
#indent run-equals-input -neei |
//indent run-equals-input -neei |
|
|
/* |
/* |
* When a single indentation level is the same as the continuation |
* When a single indentation level is the same as the continuation |
* indentation, the code does not clearly show whether the 'b' belongs to the |
* indentation, the code does not clearly show whether the 'b' belongs to the |
* condition or the body statement. |
* condition or the body statement. |
*/ |
*/ |
#indent run -neei -i4 |
//indent run -neei -i4 |
bool |
bool |
less(int a, int b) |
less(int a, int b) |
{ |
{ |
Line 58 less(int a, int b) |
|
Line 58 less(int a, int b) |
|
b) |
b) |
return true; |
return true; |
} |
} |
#indent end |
//indent end |
|
|
/* |
/* |
* Adding the extra level of indentation is useful when the standard |
* Adding the extra level of indentation is useful when the standard |
Line 66 less(int a, int b) |
|
Line 66 less(int a, int b) |
|
* such a case, the continued condition would have the same indentation as the |
* such a case, the continued condition would have the same indentation as the |
* following statement, which would be confusing. |
* following statement, which would be confusing. |
*/ |
*/ |
#indent run -eei -i4 |
//indent run -eei -i4 |
bool |
bool |
less(int a, int b) |
less(int a, int b) |
{ |
{ |
Line 78 less(int a, int b) |
|
Line 78 less(int a, int b) |
|
b) |
b) |
return true; |
return true; |
} |
} |
#indent end |
//indent end |
|
|
/* |
/* |
* With an indentation size of 4, the width of the code 'if (' is exactly one |
* With an indentation size of 4, the width of the code 'if (' is exactly one |
Line 87 less(int a, int b) |
|
Line 87 less(int a, int b) |
|
* XXX: This is unexpected since this creates the exact ambiguity that the |
* XXX: This is unexpected since this creates the exact ambiguity that the |
* option '-eei' is supposed to prevent. |
* option '-eei' is supposed to prevent. |
*/ |
*/ |
#indent run -eei -i4 -nlp |
//indent run -eei -i4 -nlp |
bool |
bool |
less(int a, int b) |
less(int a, int b) |
{ |
{ |
Line 99 less(int a, int b) |
|
Line 99 less(int a, int b) |
|
b) |
b) |
return true; |
return true; |
} |
} |
#indent end |
//indent end |
|
|
|
|
/* |
/* |
Line 107 less(int a, int b) |
|
Line 107 less(int a, int b) |
|
* with a word or an operator like '&&'. The latter cannot start a statement, |
* with a word or an operator like '&&'. The latter cannot start a statement, |
* so there would be no ambiguity. |
* so there would be no ambiguity. |
*/ |
*/ |
#indent input |
//indent input |
{ |
{ |
if (a |
if (a |
&& b) |
&& b) |
stmt(); |
stmt(); |
} |
} |
#indent end |
//indent end |
|
|
/* |
/* |
* XXX: The extra indentation is unnecessary since there is no possible |
* XXX: The extra indentation is unnecessary since there is no possible |
* confusion: the standard indentation is 8, the indentation of the continued |
* confusion: the standard indentation is 8, the indentation of the continued |
* condition could have stayed at 4. |
* condition could have stayed at 4. |
*/ |
*/ |
#indent run -eei |
//indent run -eei |
{ |
{ |
if (a |
if (a |
&& b) |
&& b) |
stmt(); |
stmt(); |
} |
} |
#indent end |
//indent end |
|
|
/* |
/* |
* The extra indentation is necessary here since otherwise the '&&' and the |
* The extra indentation is necessary here since otherwise the '&&' and the |
* 'stmt()' would start at the same indentation. |
* 'stmt()' would start at the same indentation. |
*/ |
*/ |
#indent run -eei -i4 |
//indent run -eei -i4 |
{ |
{ |
if (a |
if (a |
&& b) |
&& b) |
stmt(); |
stmt(); |
} |
} |
#indent end |
//indent end |
|
|
/* |
/* |
* With an indentation size of 4, the width of the code 'if (' is exactly one |
* With an indentation size of 4, the width of the code 'if (' is exactly one |
Line 147 less(int a, int b) |
|
Line 147 less(int a, int b) |
|
* XXX: This is unexpected since this creates the exact ambiguity that the |
* XXX: This is unexpected since this creates the exact ambiguity that the |
* option '-eei' is supposed to prevent. |
* option '-eei' is supposed to prevent. |
*/ |
*/ |
#indent run -eei -i4 -nlp |
//indent run -eei -i4 -nlp |
{ |
{ |
if (a |
if (a |
&& b) |
&& b) |
stmt(); |
stmt(); |
} |
} |
#indent end |
//indent end |