osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A question on modification of a list via a function invocation


Steven D'Aprano wrote:
> Not in standard Pascal, but most actual Pascal compilers let you perform 
> pointer arithmetic.

Well, sort of. In the ones I've seen, it's more like
being able to cast a pointer to an integer, do arithmetic
on that and then cast it back. The results are about
as implementation-dependent as that suggests.

C, on the other hand, allows arithmetic operations on
pointers directly and defines their semantics (up to a
point, you can fall off into undefined territory fairly
easily).

-- 
Greg