curtis@uwmacc.UUCP (Alan Curtis) (10/16/85)
*** PARITY ERROR *** ???? 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. The problem is that the illegal memory reference is never trapped by anything, subsequently the machine bombs and the only way to restart it is with the big red switch. A side effect of this is that if I haven't saved the current work file since the last change(s), it is lost (this has hurt a couple of times, and therefore I am quite a bit more careful about saving before every run). Also, there is obviously no diagnostic about where the program was when it went out into never-never land. 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? Another question: If other compilers don't fix this problem, will a fancy OS (such as XENIX, PCIX, etc) trap these errors and prevent the machine from going down? _Alan Curtis {allegra, ihnp4, seismo}!uwvax!uwmacc!curtis
rick@uwmacc.UUCP (the absurdist) (10/18/85)
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