Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!apple!amdahl!netcom!mcmahan From: mcmahan@netcom.UUCP (Dave Mc Mahan) Newsgroups: comp.sys.amiga.tech Subject: Re: JRComm, VLT, Handshake Message-ID: <15811@netcom.UUCP> Date: 30 Oct 90 04:11:52 GMT References: <458@faatcrl.UUCP> <15418@cbmvax.commodore.com> <466@faatcrl.UUCP> Organization: Dave McMahan @ NetCom Services Lines: 24 Distribution: In a previous article, jprad@faatcrl.UUCP (Jack Radigan) writes: >andy@cbmvax.commodore.com (Andy Finkel) writes: > >>If your program breaks when location 0 is non NULL this means >>you have an unitialized pointer somewhere in your program, and >>are using memory you did not allocate (ie location 0) > > Uh, according to K&R, NULL is a valid assignment for a pointer, so >how is it unitialized? > > But, my question is the NULL pointer itself, if NULL is a valid constant, >then the location NULL should contain nothing either, right? I don't think so. Just because NULL is a valid initialization for a pointer doesn't mean that it HAS to point to something legal. After all, what is your definition of legal? K&R just states that all static and global variables will default to NULL, I don't think it says anything about what the NULL location has to contain. It is also legal to set an integer pointer to an odd address on the 68000 CPU. Just don't try to use it though. :-) > -jack- -dave