Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ncar!asuvax!stjhmc!f14.n15.z1.fidonet.org!Dave.Harris From: Dave.Harris@f14.n15.z1.fidonet.org (Dave Harris) Newsgroups: comp.lang.c Subject: Prototypes local or global opinions wanted Message-ID: <14696.28636304@stjhmc.fidonet.org> Date: 22 Jun 91 14:41:13 GMT Sender: ufgate@stjhmc.fidonet.org (newsout1.26) Organization: FidoNet node 1:15/14 - Nibbles 'n Bits, Orem UT Lines: 22 >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@f14.n15.z1.fidonet.org