Sujet : Re: Top 10 most common hard skills listed on resumes...
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.cDate : 09. Sep 2024, 17:47:18
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <865xr4kc4p.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Ben Bacarisse <
ben@bsb.me.uk> writes:
Bart <bc@freeuk.com> writes:
>
In language like C, the LHS of an assignment is one of four categories:
>
A = Y; // name
*X = Y; // pointer
X[i] = Y; // index
X.m = Y; // member select
>
I can think of three others. There may be more.
Yes, very good. I count four or five, depending on what
differences count as different.
A is a simple variable;
>
C does not define the term "simple variable" so presumably you
define it to be any named object that /can/ appear on the LHS
of a simple assignment -- a sort of "no true Scots-variable".
I think what you're talking about here is an identifier that
looks like it could be assigned to but can't be due to some
semantic information attached to the identifier. If that is
it then I'm okay with the "simple variable" phrase, with the
understanding that the phrase is being used informally rather
than completely precisely.
X represents a term of any complexity, and Y is any
expression.
>
I can think of at least one expression form for X that contradicts
this claim.
I haven't figured this one out yet. I'm assuming you don't mean
just a lack of parentheses around X that is causing the problem.
I guess I'm also assuming you're talking only about syntax, and
semantic information doesn't enter into it.
It would be great if C had simple rules, but it doesn't. You could have
started by saying something about the most comment forms of assignment
being those you list, and that X can be almost any term, but the risk of
making absolute claims is that people (like me) will look into them.
I have two problems with understanding some of Bart's comments.
One, he often isn't careful to express himself accurately or
precisely.
Two, his vocabulary can be unpredictably idiosyncratic.
I think the combination of these two aspects make it harder for
me to understand him than either aspect would just by itself.