S
Stephen Sprunk
....if i have one generic operation *:AxA->A and AcN [can be
A=32 bit integers unsigned for example A=0..0xFFFFFFFF or 64 bit
integers etc]
if math operations * is not the same thru machines[the * has to
associate the same numbers], and number elements object A
contain are not the same thru machines, than the operation * can
not be portable thru machines that want use it
The only operations that C defines for pointers are:
pointer ? pointer + integer
and
integer ? pointer - pointer
For those without working Unicode support in their newsreader, like
Rosario1903 apparently, those "?"s were left arrows.
integer... i have seen somewhere pointeraddress/ unsigned too and
pointerADDRESS*unsigned too
C does not define multiplication or division on pointers, so any attempt
to do so is inherently non-portable.
Granted, those operations do have a fairly obvious meaning on systems
with a flat linear address space, but not all C implementations run on
such systems. The world is a lot bigger than x86 and RISC, and one of
C's strengths is its ability to run on a wide variety of systems--and
that is a direct result of leaving certain details of the language
undefined (or vice versa, actually).
S