When it is amoral... (Re: When is a cast not a cast?)

Doug Gwyn gwyn at smoke.BRL.MIL
Thu May 4 14:16:04 AEST 1989


In article <2763 at buengc.BU.EDU> bph at buengc.bu.edu (Blair P. Houghton) writes:
-	Now I know much, much better.  A pointer isn't really a
-	data type at all.  It's a different sort of beastie,
-	germane only within a program, and therefore it is
-	fallacious to see it as having the properties of a
-	countable, measurable, or otherwise physical entity.
-The way pointers work implies that they don't refer at all to
-anything physical, even to memory locations.

I don't think you have it figured out yet.

-It doesn't change the fact that I'd like to be able to add and subtract
-pointers regardless of what trouble I _might_ get into.

Fine; cast them into the appropriate integral type and do whatever
integral arithmetic your heart desires.  Don't expect anyone else to
appreciate the beauty of your code when you've done this..



More information about the Comp.lang.c mailing list