Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!sun-barr!texsun!texbell!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: When is a cast not a cast? Message-ID: <4256@ficc.uu.net> Date: 21 May 89 18:51:44 GMT References: <406@skye.ed.ac.uk> <10276@smoke.BRL.MIL> <2890@buengc.BU.EDU> <2918@buengc.BU.EDU> Organization: Xenix Support Lines: 28 In article <2918@buengc.BU.EDU>, bph@buengc.BU.EDU (Blair P. Houghton) writes: > POINTERS ARE NOT MEMORY LOCATIONS. THAT'S A CHILDHOOD > EXAMPLE FOR THE PASCAL-DEPROGRAMMED. GROW UP, C-LAND I'm glad you noticed that. You're the only one who seems determined to think they are. If pointers were simply memory locations, pointer addition would be a non- problem. But they aren't, and it isn't. What do you get when you add segment "xylophone-buggywhip" offset "3 marshmallows" to segment "xylophone- buggywhip" offset "7 marshmallows"? It may not even be possible to compute "2 * xylophone-buggywhip", even as an intermediate. So you have to do what? Just add the offsets? And there's nothing wrong with adding "3" to "2222 Dwight Way, Berkeley, CA". You get "2225 Dwight Way, Berkeley, CA". But if you subtract 3 from "1900 Hayes Road, Houston, TX" you end up in the middle of "Andrau Airport". But you can't add "2222 Dwight Way" to "2225 Dwight Way". Where are you measuring from? And I don't think there is a "4447 Dwight Way". (Quick Question, what's at 2222 Dwight Way?) -- Peter da Silva, Xenix Support, Ferranti International Controls Corporation. Business: uunet.uu.net!ficc!peter, peter@ficc.uu.net, +1 713 274 5180. Personal: ...!texbell!sugar!peter, peter@sugar.hackercorp.com.