cdecl keyword ( re: C Decl ... )

Michael Ryan miker at wjvax.UUCP
Thu Mar 31 04:37:18 AEST 1988


In article <297 at ho7cad.ATT.COM>, ekb at ho7cad.ATT.COM (Eric K. Bustad) writes:
> In article <1238 at wjvax.UUCP>, miker at wjvax.UUCP (Michael Ryan) writes:
> > [stuff deleted]
> > why not use the cdecl keyword , as supported by Msoft 5.0 ....
> > 	void cdecl foo( int x, double y) 
> > [more stuff deleted]
> No one else has asked, so I guess that I must reveal my ignorance.
> Can someone explain the meaning of Microsoft's "cdecl" keyword?
> = Eric

as the perpetrator I offer a quick [trans/exp]lation for 
those who haven't had the pleasure of using usoft C.

cdecl
-----

re: K & R appendix A, pg. 180
'Some implementations also reserve the words "fortran" and "asm."'

ok, usoft reserves the words 'fortran', 'pascal', and 'cdecl' all for
similar reasons. these words signify that the object so identified
is to be handled using that language's conventions.( e.g. how
to push arguments onto the stack, how large/small is an integer ... )

ex:
---
	double pascal dave( int x, double y)
dave here is a pascal routine that would pass arguments in order, blah, blah..
with PASCAL integer and double precision sizes , blah, blah...

ex:
---
	char cdecl steve( int f , char g)
steve is a C language routine that pushes arguments according to C conventions,
g then f, with appropriate sizes, etc. 

cdecl -> C DEClaration. thus, mixed language modules can be tagged by
language and LINKED together. 

usoft takes great pride in their mixed language capabilities.

now you know ... 
-- michael
-- 
====	*michael j ryan
	*{..!pyramid,..!decwrl!qubix}!wjvax!miker
	*Watkins-Johnson Co., San Jose CA : (408) 435 1400 x3079
	* above views are not necessarily those of Watkins-Johnson Co.



More information about the Comp.lang.c mailing list