Xref: utzoo comp.lang.c:40417 comp.lang.c++:14357 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!uunet!sequent!ogicse!intelhf!ichips!iWarp.intel.com!inews!hopi!bhoughto From: bhoughto@hopi.intel.com (Blair P. Houghton) Newsgroups: comp.lang.c,comp.lang.c++ Subject: Re: Prototypes local or global opinions wanted Message-ID: <4845@inews.intel.com> Date: 25 Jun 91 01:33:05 GMT Article-I.D.: inews.4845 References: <1991Jun20.202241.7531@msuinfo.cl.msu.edu> <6592@trantor.harris-atd.com> <1991Jun24.132406.1@acad3.alaska.edu> Sender: news@inews.intel.com Organization: Intel Corp, Chandler, AZ Lines: 18 In article <1991Jun24.132406.1@acad3.alaska.edu> fxsdb@acad3.alaska.edu writes: >In article <6592@trantor.harris-atd.com>, mvm@caesun6.harris-atd.com (Matt Mahoney) writes: >> Functions are always global, so their prototypes should be global too. > >Functions can be declared locally with local prototypes which was, I believe, >the focus of the question. I much prefer global functions, as this encourages >writing general functions which are reused throughout the code, and can easily >be #included. Block-scoped function definitions can import block-scoped variables. Very handy when hacking a decision tree into a former straight-flow construct. --Blair "Information hiding in the rushes."