Mathlink packets
- To: mathgroup at smc.vnet.net
- Subject: [mg16255] Mathlink packets
- From: tobiasoed at my-dejanews.com
- Date: Fri, 5 Mar 1999 00:41:18 -0500
- Organization: Deja News - The Leader in Internet Discussion
- Sender: owner-wri-mathgroup at wolfram.com
I try to write my own frontend for mathematica, unfortunately the available documentation on MathLink is really poor. (I read The Book, the old tutorial, and the stuff in the devloppers kit). Looking at what other people did (jmath by Jim Radford and frontend by S.C. Sheridan) I managed to get something that is mostly working, but I need this to work safely without Mathematica sessions crashing. The trouble is I do not know the structure of the packets I get from the kernel. If I get a packet, how can I be sure I retrieve all it's content before calling MLNext/NewPacket ? For expample, I figured that the following response to a MENUPKT (after Interupt[]) works: get an integer 0 or 1 ??? get a string Interrupt> if the integer is 0 (happens when you answer semething else than abort, quit inspect etc. to an erlier interrupt) there comes a TEXTPKT containg the possible choices. Once all this stuff is retrieved from the link, you need to send a TEXTPKT to the kernel with the choice of the user. I figured this out by trial and error, and am wondering how the guys at wolfram expect people to write mathlink apps that are stable. Or is there some doc I do not have ? -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own