Liste des Groupes | Revenir à cl c |
Bart <bc@freeuk.com> writes:Sure, but the same thing happens on both sides: one ends up performing a Read via that Lvalue, and the other does a Write via that Lvalue.
[...]So what exactly is different about the LHS and RHS here:The RHS is evaluated to determine the current value stored in the object
>
A = A;
named A. The LHS is evaluated to determine the object that's designated
by the name A; its current value is irrelevant.
In C terms, the RHS undergoes *lvalue conversion*, where an expressionBut it must have that conversion on the LHS, otherwise it's A's address that is written to rather than its value, which doesn't make sense. That's why I said it was asymmetric; the RHS needs an explicit operator, the LHS doesn't.
that's an lvalue is converted to the value stored in the designated
object. The LHS does not undergo lvalue conversion.
(In BLISS, doing the same thing requires 'A = .A' AIUI; while 'A = A'Because BLISS, unlike C, does not have implicit lvalue conversion; the
is also valid, there is a hidden mismatch in indirection levels
between left and right. It is asymmetric while in C it is symmetric,
although seem to disagree on that latter point.)
prefix "." operator performs explicit lvalue conversion. I presume the
"." operator isn't specific to assignments.
In C, the LHS and RHS are evaluated differently. In BLISS, they'reIt sounds like you've got it backwards.
evaluated in the same way, requiring an explicit operator to do what
done implicitly by context in C. I'd call the former asymmetric and the
latter symmetric.
Les messages affichés proviennent d'usenet.