Re: Mathlink: How do I pass arbitrary data from Mathematica to C?
- To: mathgroup at smc.vnet.net
- Subject: [mg87024] Re: Mathlink: How do I pass arbitrary data from Mathematica to C?
- From: Karen Bindash <KarenBindash at googlemail.com>
- Date: Sat, 29 Mar 2008 04:24:02 -0500 (EST)
- References: <fs4rmb$p3s$1@smc.vnet.net> <fs7ilu$gll$1@smc.vnet.net>
On 27 Mar, 13:15, Jens-Peer Kuska <ku... at informatik.uni-leipzig.de> wrote: > Hi, > > > Do you have an example of this, where the format of the data is not > > known in advance? > > Do you think this is a Mathematica problem ? It would help if there were more examples in the examples directory. There are only 1090 lines including all C files, the make file, all the templates. That's not exactly over-generous for examples. Many examples on the web use "addtwo.c" so are not really much additional help. I feel there needs to be a number of more complex examples. > It is up to *you* to set up your data structure. My data structure is very simple - I just want to pass potentially random data from Mathematica to the C code. I do not expect Mathematica to understand the format - just pass it. The use of "String" may be OK, as that is an "const unsigned char" (I might be wrong about the unsigned), but I'm not sure if Mathematica will handle special characters any different from others. Karen