To even tell what the intent of a 100-line function is? The fact that
the comments are so few, and generally misspelled, suggest that what's
going on here is beyond simple inarticulateness.
Face it: the current state of software is an unholy mess, and the
paradigm doesn't work. Windows source code looks like this.
John
OK, I will face it, I have heard your argument before, but I happily write
many hundreds of lines of C code without additional explaining text before
each line (that is what you want).
Long ago I have learned: Write your code so it is readble, so not something like:
double pnurk(double a, souble b)
{
double c;
c = b / a;
return b / a;
}
but:
BOOL calculate_current(double resistance, double voltage, double *current)
{
if(debug)
{
fprintf(stderr,\
"calculate_current: arg resistance, voltage\n",\
resistance, voltage);
}
if(resistance < 0.0)
{
fprintf(stderr,\
"My-Program: calculate_current():\n\
Your resistance is negative (%.2f), you must be kidding right? Aborting.\n",\
resistance);
return SUCKS;
}
*current = voltage / resistance;
if(debug)
{
fprintf(stderr, "calculate_current(): calculated current=%.2f\n", *current);
}
return OK
}
Sorry could not resist.
So in a program you can then know what it does.
Of course the example is very simple, but if you are consistent
most of the time you need no more text, use the right variable names.
And use spaces.....
return a/b*c%25+15; // sucks
In the link we were talking about it is 100% clear to me at least what happens.
If you have a look at gcc, and libc.info (the reference in Linux) you can
look up all these functions.
I cannot say anything about the MS soft... MS is C++ so, and so silly that
Visual Studio.
I program in Linux with 9 rxvt terminals, libc.info open in one of these, with
the source in a normal text editor in an other rxvt, and run the code in a third
rxvt.
And switch between the virtual screens with ctrl-cu left-right-up-down.
rarely run out of (9) rxvts.
No mouse, only mouse when I test GUI stuff, and even then started from rxvt.
Anyways I do not see your problem, but you are no programmaer I think, so I
had very very hard time myself in the begining (>20 years ago) to understand
C code... mathematical shock to see != and == etc..