Sujet : Re: TeX and Pascal [was Re: The joy of FORTRAN]
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : alt.folklore.computers comp.os.linux.miscDate : 04. Oct 2024, 21:10:42
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vdpi42$bgk6$6@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
User-Agent : Pan/0.160 (Toresk; )
On Fri, 4 Oct 2024 12:48:14 +0100, The Natural Philosopher wrote:
One less keystroke in C.
[:=] -> [=] -1
But then you need another keystroke for equality comparisons.
[->] -> [?] -2
Pascal:
ptr^.field
C:
(*ptr).field
ptr->field
ptr[0].field
Then you try another pointer level:
Pascal:
ptr^^.field
C:
(**ptr).field
ptr[0][0].field
C definitely loses here. Pointer indirection should have been a postfix,
not a prefix, operator.