MathLink Q: Not working anymore!!

*Subject*: [mg3265] MathLink Q: Not working anymore!!*From*: song at cs.purdue.edu (Chang-Hyeon Song)*Date*: 21 Feb 1996 10:58:26 -0600*Approved*: usenet@wri.com*Distribution*: local*Newsgroups*: wri.mathgroup*Organization*: Purdue University*Sender*: daemon at wri.com

Hi. I am working on Math to C converter. I put :Evaluate: Attributes[M2C] = {HoldAll} in my .tm file to get the whole expression availble in calling C function. It used to work. But after I lost my .tm file, and recode it, it doesn't work any more. I have to use explicit Hold[] for argument to prevent evaluating. The following is my .tm file ---------------- :Evaluate: BeginPackage["ConvertPackage`"] :Evaluate: M2C::usage = "M2C[exp] will convert given mathematica an expression or a compound expression into a correspoding C program" :Evaluate: Begin["Private`"] :Begin: :Function: m2c :Pattern: M2C[exp_] :Arguments: {exp} :ArgumentTypes: {Manual} :ReturnType: Manual :End: :Evaluate: Attributes[M2C] = {HoldAll} :Evaluate: End[ ] :Evaluate: EndPackage[ ] ----------- Now I have to do M2C[Hold[ ]] instead of M2C[ ]. I also try to set attribute in MAthematica session after I install C function, but it doesn't work either. ??M2C says ---------------- M2C[exp] will convert given mathematica an expression or a compound expression into a correspoding C program Attributes[M2C] = {HoldAll} M2C[exp_] := ExternalCall[LinkObject["m2c", 2, 2], CallPacket[0, {exp}]] ----------------- Putting the Evalauate line in different line doesn't make any difference. Can anybody help? --- Chang Song (song at cs.purdue.edu)