brix99luftballons said:
<snip>
till now i've never found a system that pass a 0 as
> argc, but it should exist,
> maybe on a very small controllers environment...
Macs and Unices aren't that small.
>> Please explain why parentheses make the return code more readable. Does
>> this apply to every expression, or just to the expression that
>> (optionally) follows a return statement? If so, why is return special?
>>
> It's just a question of style. I prefer to place parentheses. Return is
> not special,
Agreed. So why adorn its expression with parentheses? = takes an
expression
as its right operand. Do you write a = (b)? Or how about +, which takes
two expressions as its operands. Do you write: a = (b) + (c) ?
If so, why? And if not, why treat return differently?
> so it is trated in the same way of all other cases where parentheses
> should be used also when they are superfluous.
If they are superfluous, why use them at all? I can understand why you
might add them in places where the precedence isn't obvious, e.g. in
something like (a << b) + c - but surrounding an expression with
parentheses does nothing to clarify precedence within the expression
itself.
>> What makes you think that adding parentheses helps? If the reader can't
>> comprehend a*32 / b + c - d * e / oh_my_good, why are they more likely
>> to comprehend (a*32 / b + c - d * e / oh_my_good)?
>>
> Yea, but of couse for me is much better to use parentheses:
Why?
> retun( (((z*100)/y)+((w-r)*k)) / u );
>
> That it is a non-ambiguous form,
So is the original.
> readable also from people with little
> knowledge
> of the language and not familiar with the specific operator's
precedence.
How, precisely, does changing return 0; to return(0); clarify precedence?
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www.
+rjh@[EMAIL PROTECTED]
users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999


|