Prototypes local or global opinions wanted

Dave Harris Dave.Harris at f14.n15.z1.fidonet.org
Sun Jun 23 00:41:13 AEST 1991


 >The advantage to the local declaration that I can see is that an
 >unintentional call to bar() will be flagged by the compiler. I prefer to
 >use the global declaration because if the definition of bar should
 >change, there's one place to change the prototype.

 >Any other opinions?

Normally that is the best way to do it.  In the gutless wonder world of the 
IBM PC and the crummy compilers such as Microsoft's that run out of memory 
when you include lots of definitions it can help to just prototype what you 
need as opposed to including a whole .h file.  Helps the compile speed to (and 
microsoft needs all the help it can get).

 


 

--  
Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!15!14!Dave.Harris
Internet: Dave.Harris at f14.n15.z1.fidonet.org



More information about the Comp.lang.c mailing list