Xref: utzoo comp.lang.c:8789 comp.sys.ibm.pc:13987 Path: utzoo!utgpu!water!watmath!clyde!burl!codas!abcom!ncsc5!cpsc55!jio From: jio@cpsc55.ATT.COM (James Odom) Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: C declaration styles Message-ID: <346@cpsc55.ATT.COM> Date: 29 Mar 88 07:33:03 GMT References: <1065@sask.UUCP> Organization: AT&T CPSC, Denver, CO. Lines: 28 From article <1065@sask.UUCP>, by coleman@sask.UUCP (Geoff Coleman @ College of Engineering): >> Xref: sask comp.lang.c:6877 comp.sys.ibm.pc:10098 >> I need help porting C programs around. >> When I write my C functions on my personal computer, my declarations >> are often like this : >> void foo(int x, double y) > > Could you please tell us what kind of PC (if not an MS-DOS) > and what kind of compiler you ate using. The above isn't Lattice > or Microsoft and I would be suprised if it is Turbo. > > Geoff Coleman | BITNET: Coleman@sask > The declaration in the original article is a form of 'prototyping' and is a feature of Borland's Turbo C. This type of declaration checks the type of the variables passed to it by the calling function and warns the user at compile time if the types do not match. +------------------------------------------------------------------------+ |James I. Odom | |AT&T CPSC Denver, Co Voice: (303) 889-0211 | |ATTMAIL: JODOM Compuserve: 70070,137 uucp: ihnp4!cpsc55!jio | | BIX: jodom SOURCE: TCC375 | |------------------------------------------------------------------------| |Disclaimer: Any opinions expressed are my own etc. | +------------------------------------------------------------------------+