Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!eecae!netnews.upenn.edu!rutgers!cmcl2!yale!spolsky-joel From: spolsky-joel@CS.YALE.EDU (Joel Spolsky) Newsgroups: comp.sys.ibm.pc Subject: Re: Turbo C vs. Pascal Message-ID: <52903@yale-celray.yale.UUCP> Date: 7 Mar 89 05:43:12 GMT References: <46500039@uxf.cso.uiuc.edu> Sender: root@yale.UUCP Reply-To: spolsky-joel@CS.YALE.EDU (Joel Spolsky) Organization: Yale University Computer Science Dept, New Haven CT 06520-2158 Lines: 49 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. Does the size of the C code stop increasing after a certain point | (i.e. a long C program is of equal length to a long Pascal program) or are C | files generally very large? I'm not overly-concerned with small differences | in size, but it seems to me that if it takes 9k to print something on the | screen, a decent sized C program will fill up my hard drive. Most of that 9K is overhead for including the function printf() which is quite complicated. Needless to say this is a one shot deal. Also, you probably didn't turn off debugging information, which would further reduce the size of the .exe file. Finally, you could convert EXE files to COM files if they are smaller than 64K (text + data) which makes them even smaller, usually. In other words, you can expect that for normal size programs Turbo-C and Turbo-Pascal will produce about the same size code, however C source is smaller, requires less typing; also C allows you to express some things in less code than it would take to express them in Pascal (e.g. strings > 255 characters, unions, bitfields, etc). | | 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? Hypothetically the compile maker can require a royalty, but Borland doesn't. | 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? No hard and fast rules. The rule I like is that changing the integer means a major rewrite, the .1 reflects new features, the .01 is anything that is usually transparent to the user (bug fixes or speedups). | Matt Henry +----------------+----------------------------------------------------------+ | Joel Spolsky | bitnet: spolsky@yalecs.bitnet uucp: ...!yale!spolsky | | | internet: spolsky@cs.yale.edu voicenet: 203-436-1483 | +----------------+----------------------------------------------------------+ #include