Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site uwmacc.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!uwvax!uwmacc!rick From: rick@uwmacc.UUCP (the absurdist) Newsgroups: net.lang.pascal,net.micro.pc Subject: Re: Dangling pointers in Turbo Message-ID: <1574@uwmacc.UUCP> Date: Fri, 18-Oct-85 13:06:09 EDT Article-I.D.: uwmacc.1574 Posted: Fri Oct 18 13:06:09 1985 Date-Received: Sun, 20-Oct-85 06:22:26 EDT References: <1568@uwmacc.UUCP> Reply-To: rick@maccunix.UUCP (Rick Keir) Distribution: net Organization: UWisconsin-Madison Academic Comp Center Lines: 27 Xref: watmath net.lang.pascal:365 net.micro.pc:5667 In article <1568@uwmacc.UUCP> curtis@uwmacc.UUCP (Alan Curtis) writes: >I've been using TURBO (V 3.0) on my PC to do some class work, and have >run into a problem whenever I accidentally leave pointers uninitialized >or use pointers that are set to nil. <...> >My question is: Is this just a result of using a cheap compiler, or >does MS-PASCAL and other "expensive" pascal compilers also suffer the >same problem? Alan, it is not caused by Turbo being "cheap". The Pascal compiler for VM/CMS on an IBM 4341 will give you a lovely error message for a pointer if you accidentally rearrange your declarations and block structure (and this is easy with a line-oriented editor): Internal Consistency Detected: Notify your IBM Compiler Support Group -- [and then some address in New York ] (Isn't this enlightening?) This, together with various messages about ABEND, program aborting, etc. As my semester project was by this time a 2 and 1/2 inch thick listing, it took me 2 days to find that the damn pointer declaration had been moved 3 lines higher, outside of any block. Moving it back fixed the problem. Turbo, on the other hand, would have flagged a syntax error on the first compilation. -- Rick Keir -- right next to the Oyster Tank -- UWisc - Madison {allegra, ihnp4, seismo}!uwvax!uwmacc!rick