Sujet : Re: Top 10 most common hard skills listed on resumes...
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 05. Sep 2024, 17:54:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240905094916.287@kylheku.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-09-05, Waldek Hebisch <
antispam@fricas.org> wrote:
Bart <bc@freeuk.com> wrote:
So what exactly is different about the LHS and RHS here:
A = A;
(In BLISS, doing the same thing requires 'A = .A' AIUI; while 'A = A' 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.)
>
You seem to miss the point that assigment operator is fundamentally
assymetic.
Both sides of an assignment can be complex expressions that designate
an object (though the right side need not). Only one detail is
different: the prior value of the left hand side object is not fetched,
but rather overwritten.
All constituents of both expressions have to be evaluated the same way.
*(a->b[c++].d(arg)) = e(f)[42]
the value of a has to be fetched, c has to be incremented,
the function pointer .d called and so on.
Note also that a swap operator, which is in the assignment family, is
completely symmetric.
swap(lvalue1, lvalue2)
Both expressions get evaluated the same way. They designate objects,
the prior values of which are fetched, and then stored back in
reverse order.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca