Liste des Groupes | Revenir à cl c |
Bart <bc@freeuk.com> writes:This is the kind of thing I meant a few posts back. You don't need to take A (which refers to some place where you can store values), and tell it to fetch that value. Most HLLs will do that without being told.
On 28/08/2024 00:49, Ben Bacarisse wrote:Curious. It's what makes it consistent, though it is definitely anIndeed, 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.
uncommon approach.
The example I sawThe whole point is to remove the two contexts. A variable name is
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.
/always/ an lvalue (which is why it can be assigned). C has an implicit
lvalue to rvalue conversion in the contexts you have come to expect it.
BLISS does not. You always need a dot to convert to an rvalue.
I would argue that it is exactly the same. You seem to imply that lvalues and rvalues involve different levels of indirection.But in an lvalue one: Y writes its value; .Y may not be definedSince assignment is inherently asymmetric (you can't write 3 = A but you
>
It looks asymmetric. C like most languages is symmetric, you write 'A = A'
with the same syntax on both sides.
can write A = 3) C's syntactic symmetry hides a semantic difference.
What is needed on the two sides is not the same.
Why do you mean by call? But if this is valid in BLISS:I assume that in BLISS, A = A is legal, but does something odd like copyWhat's odd about that? And why call is a copy operation? Do you think
A's address into itself.
of A = 42 as a copy operation? BLISS is a low-level system language.
Les messages affichés proviennent d'usenet.