Re: line by line compiling in c



On Fri, 30 May 2008 10:16:13 -0700 (PDT)
vaavi <vavasgroups@xxxxxxxxx> wrote:

hello every body

i am new to programming in c
fed up of getting compiling errors
can u tell me how to do line by line compiling.........

You can't. But it is likely that you will find it easier to write
good code without errors if you write as little code as possible between
compile and test runs. Don't try to write the whole program in one go,
instead start by writing something that does the smallest possible part of
the job and make that work (this might be just putting out a prompt for
some data input or reading a line from stdin) then add to it bit by bit
compiling and testing as you go until you have the complete program. The
suggestion by gremnebulin of doing line by line coding is not far from the
mark.

This may seem at first glance like far more work than just writing
the program and testing it. But what makes it less work is that mistakes
are an inevitable consequence of being human and doing it the incremental
way means that at each step there will be very few mistakes to find and fix
and the space for them to hide in will be small which makes them easy to
find and fix. Give it a try, I think you'll like it and find that it gives
you a big edge in development speed over those who write everything and
then try to make it work.

Many will advocate automating the series of tests applied and
adding to them as the program develops. There is much to be said for this
approach but it is more time consuming on simple tasks of limited lifespan.
The payback comes with more complex and long lived programs, and the payback
can be very worthwhile.

--
C:>WIN | Directable Mirror Arrays
The computer obeys and wins. | A better way to focus the sun
You lose and Bill collects. | licences available see
| http://www.sohara.org/
.



Relevant Pages

  • Re: whose job is it to include various header files?
    ... On Fri, 14 Mar 2008, Robert P. J. Day wrote: ... alter sources and includes get obsolete, ... compiling again for files that formerly depended (implicit or ... IMHO, then, that second case is worth trying to fix when it comes ...
    (Linux-Kernel)
  • Re: Yet Another Maccie Dud [was Re: Windows Vista Possibly Punishes GNU GCC Applications]
    ... | I would appreciate being informed of a fix for this problem, ... deficiencies of the DJGPP or GCC environments, or their libraries, ... or Win98SE, so the problem is due to V*sta, not GCC 3.04 or DJGPP. ... compiling, linking, and running my sample code, using any ...
    (comp.sys.mac.advocacy)
  • Re: [slrn] Now Finicky About X-Face Headers?
    ... the Shark wrote: ... A very dirty fix, assuming you're compiling from source, might be ... No. I'd rather not have to fix it at all, ... This is not good news for those of us who want a usable slrn ...
    (news.software.readers)
  • Re: [slrn] Now Finicky About X-Face Headers?
    ... A very dirty fix, assuming you're compiling from source, might be to ... No. I'd rather not have to fix it at all, ... The point was that this is Free/Libre Open Source Software, ... This is not good news for those of us who want a usable slrn 1.0 ...
    (news.software.readers)
  • Re: RELENG_7 jerky mouse and skipping sound (still a problem -BETA3)
    ... skipping sound. ... I seems to happen when I'm compiling ports and a new ... the developers in this area reproduce the issue? ... The fix for that should be going in shortly. ...
    (freebsd-stable)