Re: [ats-lang-users] Introducing ats type to c in sats file
Unleashing the potentials of types and templates
Status: Beta
Brought to you by:
ats-hwxi
From: Hongwei Xi <hw...@cs...> - 2008-11-11 23:09:15
|
On Tue, 11 Nov 2008, Michael Maul wrote: >>Is it possible to introduce ats types to c from within a .sats file? >> >>In a .dats files I can for example :typedef int_int_pair = @(int,int) >> >> extern typedef >>"int_int_pair" = int_int_pair) >> >>This does not work in .sats with the extern removed. Given that the error is >>a syntax error I suspect that this is not possible. >> >>Ultimately I am wanting to return multiple results back from a c function as >>a tuple containg an integer result code and pointer to a c struct. If you could provide me with some pseudo code indicating what you really need, I may be able to tell whether there is a simple way around this. --Hongwei Xi Computer Science Department Boston University 111 Cummington Street Boston, MA 02215 Email: hw...@cs... Url: http://www.cs.bu.edu/~hwxi Tel: +1 617 358 2511 (office) Fax: +1 617 353 6457 (department) |