Xref: utzoo comp.lang.c:8802 comp.sys.ibm.pc:14004 Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!mailrus!tut.cis.ohio-state.edu!rutgers!super.upenn.edu!grasp.cis.upenn.edu!shirono From: shirono@grasp.cis.upenn.edu (Roberto Shironoshita) Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: cdecl keyword Message-ID: <3867@super.upenn.edu> Date: 1 Apr 88 03:41:01 GMT References: <1238@wjvax.UUCP> <297@ho7cad.ATT.COM> <1242@wjvax.UUCP> <7595@brl-smoke.ARPA> <2521@bsu-cs.UUCP> Sender: news@super.upenn.edu Reply-To: shirono@grasp.cis.upenn.edu (Roberto Shironoshita) Organization: University of Pennsylvania Lines: 21 Keywords: cdecl MicroSoft C Summary: I agree with Doug In article <2521@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: >[ cc -pascal mystuff.c ] >If mystuff.c uses any C library function, you still want that library >function to be called using the C calling convention, even though you >asked the compiler to generate code for the Pascal calling convention. I would much rather do away with the switch to generate foreign calling conventions, and assume anything is a C function unless otherwise declared. >With a little foresight Microsoft could have just used the same calling >convention in all its language translators. I am of the belief that most languages have their own calling conventions: FORTRAN uses pass-by-reference for everything (at least, that's what I heard last); PASCAL uses pass-by-value for regular parameters, and pass-by-reference for VAR parameters. C uses pass-by-value for everything. Roberto Shironoshita ------------------------------------------------------------------------- 1- The University doesn't know I exist. | Internet: 2- Of course I may be wrong. | shirono@grasp.cis.upenn.edu