Interfacing with C - macros and stuff
Marek Janukowicz <[email protected]> Mon, 10 Jan 2011 01:02:14 +0100
| Newsgroups | gmane.comp.lang.sather.announce |
|---|---|
| Organization | Starware |
| Message-ID | <[email protected]> |
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; and then (given I'd include netdb.h somewhere) C_SMTH::AI_PASSIVE would contain the value of this C macro? Because I can't do that: I can't create a constant and not init it immediately and if I init it, it doesn't contain C value, but Sather value I provided, right? So to sum it up - either it's poorly specified or not implemented (partially/completely) or I'm reading it wrong. -- Marek Janukowicz