> This is the unary '+' operator. It's the same as the unary '-'
> operator, except it doesn't change the sign of its operand's value.
>
> I can't think of any practical use for it in C.
Actually at some stage in the development of one of the C standards it had
a practical use. At that stage "a + (b + c)" could be rearranged regardles
of whether it could change the result value or not. The unary plus was
introduced to disallow rearrangement when written as "a + +(b + c)". The
allowances for rearrangement were changed later (they are only allowed
when the result value of a valid expression would not change by the
rearrangement), but the unary plus was left in.
Having the unary plus is not so very useful in itself, but it allows for
cleaner display of tables (as in initialisations). Unlike original C,
all other programming languages I know do have it. Consider the following
initialisation in C:
double dc[] = {1.0,
-0.16666666666666666667,
0.00833333333333333333,
-0.00019841269841269841,
0.00000275573192239858,
-0.00000002505210838544,
0.00000000016059043836,
-0.00000000000076471637};
I would much have preferred it with unary plus.