Re: Interfacing with C - macros and stuff

Keith Hopper <[email protected]> Tue, 11 Jan 2011 10:22:32 +1300
Newsgroups gmane.comp.lang.sather.announce
Message-ID <[email protected]>
Greetings,

Marek Janukowicz wrote:
> Hello
>
> Specification p. 15.2. reads: "Constants of external C types are interpreted
> as C constants or macros.".
>
> Am I misreading it or does it mean I should be able to do smth like:
>
> external C class C_SMTH is
>    const AI_PASSIVE : C_INT;
> end;

      This merely indicates that there already is a constant defined 
externally in some xxx.h or xxx.c of that name. All it does is define a 
Sather name so that the Sather compiler can put in the relevant linking 
information for gcc - with 'external class' name mangling, rather than 
ordinary Sather class name mangling.

	Keith