Further question on "I have nested lists of ints....."
- To: mathgroup at smc.vnet.net
- Subject: [mg22823] Further question on "I have nested lists of ints....."
- From: "Jamie B. McHardy" <jamie.mchard at nokia.com>
- Date: Fri, 31 Mar 2000 01:01:25 -0500 (EST)
- Organization: Nokia Mobile Phones Ltd.
- Sender: owner-wri-mathgroup at wolfram.com
Jens-Peer Kuska has informed me that must use MLGetNext etc in order to get the information over. I have this problem though, the function "SendDataToC" for example, int SendDataToC( void ) { int n, pkt; /* Send "LinkBuffer" this holds the data that is needed in C, Refer to the original question... */ MLPutFunction( stdlink , "EvaluatePacket", 1L); MLPutSymbol( stdlink, "LinkBuffer\0"); MLEndPacket( stdlink ); /* skip any packets before the first ReturnPacket */ while( (pkt = MLNextPacket( stdlink ), pkt) && pkt != RETURNPKT) { MLNewPacket( stdlink ); if( MLError( stdlink )) error( stdlink ); } MLGetArgCount(stdlink, &iArgCount); while( iArgCount-- ) { /* read_element is a function that uses switch with MLGetNext(...) to cope with all types of data in the structure being sent over All this is modified from the factor3.c in the mathematica example programs*/ read_element( stdlink ); } } This just doesn't work. I have tried this in many different ways, including having manual in the Template file and then trying to get it over that way. What is wrong with this method? is it possible to get this data over? how would I go about doing it. There seems to be no information on how to get non uniform data over a mathlink that is calling an application from within Mathematica. Many thanks in advance. Jamie