comp.lang.ada
 help / color / mirror / Atom feed
* Making ada (types) "visable" in C
@ 2005-01-27 13:10 Sebastian
  2005-01-27 13:36 ` Lutz Donnerhacke
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sebastian @ 2005-01-27 13:10 UTC (permalink / raw)


Hi,

How shall I make specific Ada types visable in C code. E.g. If I want
to call an Ada procedure from C that has own type defintions how do I
do? In this example I want to call an Ada procedure that is called
Initialize from
a c-file/function. The Ada procedure has own types how shall I
"convert" them to C-types?

------------------------------------------------------------
ADA side:

   type State_Buff is (Ok, Failed);
 
   type Baud_Type is (R9600, R19200); 

   type Parity_Type is (None, Odd, Even); 

   type Stop_Bit_Type is (One, Two); 
        
   Initialize (
      Baudrate  : in Baud_Type; 
      Parity    : in Parity_Type;
      Stop_Bits : in Stop_Bit_Type;
      Status    : out State_Buff);

   pragma Export(C, Initialize, "MyInitializeInC");
------------------------------------------------------------
C side:

?



------------------------------------------------------------
Regards

di98



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-01-27 23:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-27 13:10 Making ada (types) "visable" in C Sebastian
2005-01-27 13:36 ` Lutz Donnerhacke
2005-01-27 17:59 ` tmoran
2005-01-27 23:06 ` Nick Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox