Liste des Groupes | Revenir à cl c |
On 28/08/2024 00:49, Ben Bacarisse wrote:
Indeed, and BLISS is not like that. I had hoped to shed some light on>
why there is some logic to BLISS's rather idiosyncratic design.
Given a declaration like 'int A' then:I don't think that's right. To change the value at address A (what I
>
BLISS C
>
Read or write A's value .A A
think you mean by "write A's value") you write
A = 42;
in BLISS. And to add one to the value at address A you write
A = .A + 1;
OK. That's just makes it more bizarre than I'd thought.
The example I saw
included these lines:
>
GETNUM(X); ! returns a value via X
Y = STEP(.X);
PUTNUM(.Y)
>
So in an rvalue context: X reads its address; while .X reads its
value.
But in an lvalue one: Y writes its value; .Y may not be defined
>
It looks asymmetric. C like most languages is symmetric, you write 'A = A'
with the same syntax on both sides.
I assume that in BLISS, A = A is legal, but does something odd like copy
A's address into itself.
Les messages affichés proviennent d'usenet.