Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ncar!news.miami.edu!umiami!bxpfac From: bxpfac@umiami.ir.miami.edu Newsgroups: comp.lang.c Subject: A question on C programming style Message-ID: <1991Apr12.103621.8907@umiami.ir.miami.edu> Date: 12 Apr 91 14:36:21 GMT Reply-To: devebw9f@miavax.ir.miami.edu Organization: Univ of Miami IR Lines: 27 How do the guru's on the net feel about the following two styles? Style 1: (No nested includes - user responsible for proper order of includes). -------- foo.h extern save_data (FILE *fp); use.c #include /* Needed because FILE used in foo.h and has to be included foo.h. */ #include "foo.h" Style 2: (Nested inclusion). -------- foo.h #include /* We know that this has to be included with this. */ extern save_data (FILE *fp); use.c #include "foo.h" #include /* Is now optional and if included, would not be included twice provided that the is set up properly. */ Bimal / devebw9f@miavax.ir.miami.edu