Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ukma!tut.cis.ohio-state.edu!osu-cis!att!cbnews!shurr From: shurr@cbnews.ATT.COM (Larry A. Shurr) Newsgroups: comp.sys.ibm.pc Subject: Re: Turbo C vs. Pascal Message-ID: <4639@cbnews.ATT.COM> Date: 9 Mar 89 19:11:51 GMT References: <46500039@uxf.cso.uiuc.edu> Reply-To: cbema!las@cbnews.ATT.COM (Larry A. Shurr) Organization: AT&T Bell Laboratories (actually an AGS consultant) Lines: 57 In article <46500039@uxf.cso.uiuc.edu> mwh1629@uxf.cso.uiuc.edu writes: > I have been fiddling with Turbo Pascal and Turbo C, trying to decide >which is best. My primary concern is the final EXE file size. C seems >to compile huge. A program to print "Hello, world." on the screen >compiled to 9k, while a program to print out a table of numbers and sort >them in Turbo Pascal only took 6k. A simple Mandelbrot program in Turbo C was >24k... The integrated environment Turbo C likes to put extra debugging information in the executable, apparently even if you tell it not to, though it may simply be the case that I didn't set the right options. What I found was that when I compiled the "Hello world!" program in the integrated environment, the .exe file was 9489 bytes in length. The Mortice Kern Systems (MKS) strip utility (like Unix strip: removes debug information from the file - does not compress the file like Microsoft's EXEPACK utility) reduced it to 6752 bytes. MKS size utility showed the program size as 6240 bytes of text and 0 bss space. Then I compiled using the command line compiler with no debug options set. The resulting .exe file was 6544 bytes long. The strip utility did not reduce the size of the file and size indicated the program size as 6032 bytes of text and 208 bytes of bss for a total size of 6240 bytes. (This difference between the integrated and command line compilers is interest- ing. The two compilers allocate text and data differently, but otherwise produce the same results. Note: in both cases, I used small model.) Thus, Turbo C is not as bad as it first appears. I don't have your other programs to try so I can't comment on them. However, I will test them in the same way if you send them to me. >I also have two general questions. If you compile a program with a language >and then commercially release it are you required to pay some money to the >compiler's maker? This depends on your liscense agreement with the language vendor. Once upon a time, Microsoft (and others) required this in their liscenses. In general, they have now abandoned this requirement. Borland does not require money though they now require you either to claim a copyright for yourself and imbed a copyright notice in your compiled program or give them the copyright (I think I remember that correctly (notice to the net.police: I do have my own, paid-for copies of Turbo Pascal 5.0 and Turbo C 2.0 so leave me alone!)). > Lastly, what's the deal with version numbers? I think I >was told that, for example, Version 2.34 means that 4 is a bug fix, 3 is a >minor improvement and 2 is a major change. Is this correct? Your interpretation is logical, plausible, and is even true in some cases, but this is similarly dependent on your vendor. regards, Larry -- Signed: Larry A. Shurr (att!cbnews!cbema!las or osu-cis!apr!las) Clever signature, Wonderful wit, Outdo the others, Be a big hit! - Burma Shave (With apologies to the real thing. The above represents my views only.)