Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Notional operations Rule 10.1
#6
> The C language DOESN'T define the order of evaluation of operands except in some circumstances (see
...
> The standard DOES state that the precedence and associativity of operators are defined by the grammar
...
> I therefore think that I incorrectly asserted a left to right order.

There are several operations having an 'order' here. There is (a) the order in which the operands are inspected to decide what implicit conversions need to be performed and there is (b) the order in which operands are evaluated to obtain a value.

The order (b) is unspecified. However, the order (a) is specified by the syntax and in the case where the operands all have the same precedence it is left to right.

So you were correct to assert a left to right order when deciding what, if any, type conversions needed to be performed.
<r>Applications conformance testing: <URL url="http://www.knosof.co.uk/cbook">http://www.knosof.co.uk/cbook</URL></r>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)