MathLink Q: Not working anymore!!

*To*: mathgroup at smc.vnet.net*Subject*: [mg3265] MathLink Q: Not working anymore!!*From*: song at cs.purdue.edu (Chang-Hyeon Song)*Date*: Wed, 21 Feb 1996 02:16:54 -0500*Organization*: Purdue University*Sender*: owner-wri-mathgroup at wolfram.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) ==== [MESSAGE SEPARATOR] ====