home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14579 < prev    next >
Encoding:
Text File  |  1992-08-26  |  1.1 KB  |  40 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!mcsun!ieunet!tcdcs!maths.tcd.ie!tim
  3. From: tim@maths.tcd.ie (Timothy Murphy)
  4. Subject: Re: Why won't this compile under Think C 5.0?
  5. Message-ID: <1992Aug26.230409.29482@maths.tcd.ie>
  6. Organization: Dept. of Maths, Trinity College, Dublin, Ireland.
  7. References: <T5L3PB3w164w@uuisis.isis.org>
  8. Date: Wed, 26 Aug 1992 23:04:09 GMT
  9. Lines: 29
  10.  
  11. rrwood@uuisis.isis.org (Roy Wood) writes:
  12.  
  13. >Okay, I'm feeling frustrated and dumb.  Look at this:
  14.  
  15. >/* ----------------------------------------------------- */
  16.  
  17. >extern void MyFunction(char);
  18.  
  19. >void MyFunction(theChar)
  20. >char theChar;
  21. >{
  22. >     /* do stuff */
  23. >}
  24.  
  25. >/* ---------------------------------------------------- */
  26.  
  27. I think it will compile if you set "Prototypes required"
  28. in the Compile options (bottom of Edit menu).
  29.  
  30. The problem arises otherwise from the mixing of "new" format
  31. in the function prototype and "old" format in the function definition.
  32. I read a justification of the compiler behaviour you mention,
  33. but I didn't understand it.
  34.  
  35. -- 
  36. Timothy Murphy  
  37. e-mail: tim@maths.tcd.ie
  38. tel: +353-1-2842366
  39. s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
  40.