Operating System - HP-UX
1752866 Members
3604 Online
108791 Solutions
New Discussion

Re: Help - cant compile c program with function

 
SOLVED
Go to solution
Steven Schweda
Honored Contributor

Re: Help - cant compile c program with function

> [...] you shouldn't code that way.

No argument here. I claim that
IMPLICIT NONE
was the best thing that ever happened to
FORTRAN. The amazing thing is that someone
thought that "implicit int" was a good idea
for C.
TwoProc
Honored Contributor

Re: Help - cant compile c program with function

You're right Steve.

I can remember wading through fortran just absolutely loaded with implicits from all over the place. Nasty. Really nasty when the code wasn't yours, and was written over 25 years ago, and no-one was familiar with it. All I could do was make subroutines

The worst I ever saw was in a C program that I became the chief owner of, it was a total of 250K lines of code, and in the middle of one of the longest pieces, I found the following indented over about 200 spaces to the right.

m++;

I wrote an awk script to give me a look at program flow and variable declarations. I never found it where "m" was declared, and I never found it became instantiated. The debugger was crud (it was an off brand C compiler, I forget the name) so putting a "watch" on m was impossible to see if I could watch it come to life. Ugh.

So, I commented the line out and recompiled. And nothing worked.

:-)

Dave, no points for this please, it was just an old bad memory I wanted to share for some reason.
We are the people our parents warned us about --Jimmy Buffett