[mercury-users] Passing structures from and to C

Alexsandro Soares a_s_soares at yahoo.com.br
Wed Jul 11 00:21:55 AEST 2007


Hi all,

   I'm trying to figure out how to pass structures from Mercury to C and back again. Supose I have the following C declaration:

               typedef struct {int age; char *name;} person;

   I would like:
   1 - to declare this structure in Mercury;
   2 - to create a C function that receives an int and a string and returns this structure filled to Mercury;
   3 - to create another C function that receives this structure from Mercury and returns the field "name".  

Can anyone help me?

Thanks in advance for any answer.
Alex





       
____________________________________________________________________________________
Novo Yahoo! CadĂȘ? - Experimente uma nova busca.
http://yahoo.com.br/oqueeuganhocomisso 

--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list