Wierd ReplaceAll problem
- To: mathgroup at smc.vnet.net
- Subject: [mg42107] Wierd ReplaceAll problem
- From: Jai Bharat Patel <jaibharatpatel at yahoo.com>
- Date: Thu, 19 Jun 2003 03:59:31 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
Following statement is working when use it directly in
Mathematica:
In[1]:= ToExpression["a!=b"] /. Thread[{a,b}->{1,2}]
Out[1]=True
But same statement is not working if I use it from a
package:
Package:
BeginPackage["MathIA`Test`"]
myTest::usage =
" getRandomSet [ ] This is test package ";
Begin["`Private`"]
myTest[ ] :=
Module[ { temp2 },
temp2 = ToExpression["a!=b"]) /.
Thread[{a,b}->{1,2}] ;
Print[temp2];
]
End[]
EndPackage[]
output:
In[3]:= <<MathIA`Test`
In[4]:= myTest[]
a != b
Please let me know where is my mistake.
Thank you,
Regards,
Jai Bharat Patel
Grad Student
Universtiy of Houston
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com