Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!elsie!imsvax!paul From: paul@imsvax.UUCP (Paul Knight) Newsgroups: comp.sys.ibm.pc Subject: Turbo C/Pascal, debugging Message-ID: <719@imsvax.UUCP> Date: Mon, 6-Jul-87 22:53:12 EDT Article-I.D.: imsvax.719 Posted: Mon Jul 6 22:53:12 1987 Date-Received: Wed, 8-Jul-87 03:49:17 EDT Organization: IMS Inc, Rockville MD Lines: 79 n From my buddy Ted Holden Some thoughts on C compilers and debugging. First, I would have real moral reservations concerning the possibility of buying a copy of MicroSoft's Quick C. Left to their own devices, Gates and Co. would go on selling clunky C compilers for $500 or more forever. I mean, I know for sure how many compilers there were on earth which were actually fun to use before Borland ( 0), and can easily guess how many there will be after Gates has gotten rid of Borland ( Again, 0). The last last piece of literature I ever got from Gates was a generous offer to allow me to spend $3000 on an OS/2 C compiler and a chance to win a seat at one of his nifty OS/2 conferences. I know he didn't enjoy reading my reply. I regard most of the debugging systems in the mini-micro world as jokes. For simply seeing variable values at specific points in a program, printf's and writeln's are faster, given something really fast like Borland's systems. Further, the notion of single-stepping through real-world programs strikes me as ludicrous. In real life, problems often show up in the middle of some 700 line loop on the 300'th pass through. Only a masochist would want to single-step through that. The idea of a hardware debugger, such as Periscope's, is valid; if you need to see values of variables AFTER the system crashes, there ain't no other way. What I like about Turbo Pascal, and I don't seem to be seeing these features in Turbo C, are the checks on system errors at run time. A number of things which used to drive me batty using state-of-the-art Fortran compilers on mainframes never see the light of day in Turbo Pascal. The following code: program test1; {$R+} var i,j,k,l,ii,jj,kk,ll: integer; a,b,c,d,e,f,g: real; aa,bb: array[1..5] of integer; begin a := 1; b := 0.; c := a/b; i := 6; aa[i] := 5; end. will be stopped in its tracks at runtime, and the user will be brought back to the editor with the cursor on the offending line of code (actually, twice). This is tremendously useful, and I don't see it in Turbo C or hear about it from Microsoft, although I have to believe that Borland will have this kind of feature in Turbo C long before MicroSoft hears about it. I have never seen such a feature elsewhere in the mini-micro world. Ted Holden, HT Enterprises -- Paul Knight Disclaimer: Invaders from another sphere may be using my account. Look for multiple signatures before you flame. Thanks.