portability
RAMontante
bobmon at iuvax.cs.indiana.edu
Fri Jan 20 14:28:29 AEST 1989
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 at oberon.USC.EDU> blarson at 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.
More information about the Comp.lang.c
mailing list