Sujet : Re: do { quit; } else { }
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.cDate : 14. Apr 2025, 01:50:34
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vthm4q$26ud$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
User-Agent : Mozilla Thunderbird
On 4/13/25 14:40, Michael S wrote:
On Sat, 12 Apr 2025 17:40:25 -0000 (UTC)
...
The funny thing is that in original C prefix form of [] indexing was
equivalent to the postfix form. May be, it still is in C23, I didn't
try to look in the docs or test.
You mean the fact that array[5] and 5[array] have exactly the same
meaning? That's still there. It follows from the fact that E1[E2] is
defined as equivalent to *(E1+E2), and from the fact that E1+E2 means
the same as E2+E1, when one of them is a pointer, and the other is a
integer.
However in type declarations one always had to use only postfix form.
The "declaration follows use" concept normally picks only one of the
ways in which a declarator can be used, as the one that is mirrored by
the declaration syntax.