Liste des Groupes | Revenir à cl c |
Kaz Kylheku <643-408-1753@kylheku.com> writes:Proposal for c2yOn 2025-04-13, Michael S <already5chosen@yahoo.com> wrote:Agreed. The feature goes back to B, which was largely untyped, andThe 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.
Are you thinking of a[i] being *(a + i) being i[a] due to commutativity?
>
That's really not a useful feature. Actually right down to a + i being
commutative when a is a pointer. It would be fine if only the
<pointer> + <integer> combination were allowed.
there wasn't a strong distinction between integers and pointers. An
expression like 5[6] would refer to a memory location, and depending
on the system it might even work.
The transition from B to C was an opportunity to restrict the ordering
of the operands, but it wasn't taken.
Les messages affichés proviennent d'usenet.