[clean-list] Foreign Function Interfacting

Sean Seefried seefried@itee.uq.edu.au
Thu, 21 Mar 2002 13:53:09 +1000


Thank you all very much for your answer to my previous question.
Integers and strings are technically enough to do everything I want to do,
but not with the greatest ease.
One of you mentioned that the new Clean can interface with foreign data
structures (such as matrices).

What I'm looking for is a document that will tell me all I need to know
about interfacing with C functions from Clean.  This, I have not been able
to find on the Clean web pages.

Things I would like to be able to do are:

a) Pass an array of 32-bit integers to a C function which takes a integer
pointer (int *) as argument.

At the momment I'm going to have to convert an array of integers to an array
of chars inside Clean and then pass that to a function in C which takes a
CleanString as an argument.  I'm not sure this is nearly elegant enough for
my purposes.

------------------------------------------------
Sean Seefried
School of ITEE
The University of Queensland
Ph: 3365 8301
Mob: 0416 338 636