Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!iuvax!bobmon From: bobmon@iuvax.cs.indiana.edu (RAMontante) Newsgroups: comp.lang.c Subject: Re: portability Message-ID: <16653@iuvax.cs.indiana.edu> Date: 20 Jan 89 04:28:29 GMT References: <16573@iuvax.cs.indiana.edu> <14767@oberon.USC.EDU> Reply-To: bobmon@iuvax.cs.indiana.edu (RAMontante) Organization: malkaryotic Lines: 23 I write: >Note that 'pascal' 'fortran', and 'cdecl' exist to allow linking with >modules written in these languages and compiled by Microsoft compilers >for these languages under MSDOS. I was wrong. Turbo C doesn't recognize any fortran keyword. Not to mention 'entry'. Oops. <14767@oberon.USC.EDU> blarson@skat.usc.edu (Bob Larson) writes: > >This is true only of fortran and pascal. cdecl is a keyword only because >microsoft was to lazy to add a few #defines to their programs. It does >nothing that could not be accomplished better in the preprocessing phase. Well, I'm talking specifically about TurboC's use of the keywords; in TC the 'cdecl' keyword means that a function follows the 'C' linking and arg-passing conventions, and identifiers are case-sensitive and get leading underbars, even though the overall default may be 'pascal'-like. For example, main() must always be 'cdecl' to match the standard startup code. Maybe this could be done in the preprocessor. I'd be interested to know how, I don't know what's involved.