home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!mcsun!ieunet!tcdcs!maths.tcd.ie!tim
- From: tim@maths.tcd.ie (Timothy Murphy)
- Subject: Re: Why won't this compile under Think C 5.0?
- Message-ID: <1992Aug26.230409.29482@maths.tcd.ie>
- Organization: Dept. of Maths, Trinity College, Dublin, Ireland.
- References: <T5L3PB3w164w@uuisis.isis.org>
- Date: Wed, 26 Aug 1992 23:04:09 GMT
- Lines: 29
-
- rrwood@uuisis.isis.org (Roy Wood) writes:
-
- >Okay, I'm feeling frustrated and dumb. Look at this:
-
- >/* ----------------------------------------------------- */
-
- >extern void MyFunction(char);
-
- >void MyFunction(theChar)
- >char theChar;
- >{
- > /* do stuff */
- >}
-
- >/* ---------------------------------------------------- */
-
- I think it will compile if you set "Prototypes required"
- in the Compile options (bottom of Edit menu).
-
- The problem arises otherwise from the mixing of "new" format
- in the function prototype and "old" format in the function definition.
- I read a justification of the compiler behaviour you mention,
- but I didn't understand it.
-
- --
- Timothy Murphy
- e-mail: tim@maths.tcd.ie
- tel: +353-1-2842366
- s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
-