C declaration styles

James Odom jio at cpsc55.ATT.COM
Tue Mar 29 17:33:03 AEST 1988


>From article <1065 at sask.UUCP>, by coleman at 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 at 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.                      |
+------------------------------------------------------------------------+



More information about the Comp.lang.c mailing list