www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/29/05:50:50

From: no_spam AT please DOT com (Gary)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Dumb question that can be answered with a yes or no.
Date: Sun, 29 Mar 1998 10:37:56 GMT
Organization: Commuter Communication Systems, Austin TX
Lines: 55
Message-ID: <351e20b6.14217739@newshost.ccsi.com>
References: <4p7HWUS00WB=0A0kU0 AT andrew DOT cmu DOT edu>
NNTP-Posting-Host: pappu.ccsi.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Greetings James..

Although John may some ideas for you to implement on how to utilize
DJGPP with the RHIDE visual front end you need to realize that modular
programming involves a design approach that uses the concept of:

* Header file
* Client file
* Implementation file(s)

I can certainly see if you stuck _all_ your code in one file how this
could end up being a nightmare.. Part of the 'top down approach' is to
break the Big problem into smaller problems which lends itself to this
type of design philosophy. Further, C / C++ lends itself to this type
of design VERY nicely since its modular.. As John mentions, in the
above style of design, function(s) each exist to be called by the
client program which, itself is usually quite small.. The various
'functions' exist as implementation file(s) that can be modified
individually thus modifying or debugging individual 'modules' doesn't
become such a nightmare.. Additionally, modern day compilers will ONLY
compile the implementation files (functions) that have changed while
NOT bothering with those that haven't changed thus potentially
reducing your compilation time tremendously..

Cheers,
Gary

Coincidentally, this design approach is typically taught in the class
room of most colleges.


On Sat, 28 Mar 1998 12:51:28 -0500, James W Sager Iii
<sager+@andrew.cmu.edu> wrote:

> Ok... I was able to speed my compile time earlier with the help of this
>newsgroup.  I have realized that as my program compiles faster 
>I program quicker.  But as I program more code, my compile time
>lengthens, and I eventually hit an asymptotical point where it
>takes forever for me to get anything done...
>
>My program is 110k+ and it takes a while to compile. Most of it doesn't
>change per re-use though. I was wondering if I could parts of it
>into objects.  I tries this on my own for about 8 hours with little
>sucess. I got a few minor things to run, but when I tried to 'objectify'
>my massive amount of code, it gave me errors that looked something like
>: Repeated code found in line such and such.  This error isn't exact,
>but its been a couple days since I tried it.  Now I sincerely need
>a speed boost, and I was wondering. If the objects are per-compiled,
>would this speed up the time it takes me to compile and
>test an executable. Sorry for the mega newbie question.
>I just normally put all my code in one file.. but that isn't cutting
>it...  This sounds dumb, but I really have a small clue about how 
>objects work... Does the compiler make objects, and then the linker 
>puts them together? 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019