home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 16908 < prev    next >
Encoding:
Text File  |  1992-11-20  |  1005 b   |  30 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!Sirius.dfn.de!gwdu03.gwdg.de!gwdgv1.gwdg.de!MOELLER
  3. From: moeller@gwdgv1.gwdg.de
  4. Subject: order of 'external' declarations
  5. Message-ID: <P438VUC@gwdu03.gwdg.de>
  6. Sender: news@gwdu03.gwdg.de (USENET News System)
  7. Nntp-Posting-Host: gwdgv1.gwdg.de
  8. Reply-To: moeller@gwdgv1.gwdg.de
  9. Organization: GWDG Goettingen, F.R.Germany
  10. Date: Fri, 20 Nov 1992 20:48:23 GMT
  11. Lines: 17
  12.  
  13. I've just come across a supposedly ANSI-compatible C compiler that chokes on
  14.  
  15.     func()
  16.     {
  17.         extern char *var;
  18.         ...
  19.     }
  20.  
  21.     char *var = "some text";
  22.  
  23. With functions, this kind of "forward" declaration is quite normal,
  24. so I think it should also be ok with data (for which you have 
  25. to explicitly use 'extern'). Any opinions?
  26.  
  27. Wolfgang J. Moeller, GWDG, D-3400 Goettingen, F.R.Germany | Disclaimer ...
  28. PSI%(0262)45050352008::MOELLER      Phone: +49 551 201516 | No claim intended!
  29. Internet: moeller@gwdgv1.dnet.gwdg.de   | This space intentionally left blank.
  30.