Mathematica Problem
- To: mathgroup at smc.vnet.net
- Subject: [mg42085] Mathematica Problem
- From: Jai Bharat Patel <jaibharatpatel at yahoo.com>
- Date: Wed, 18 Jun 2003 02:11:16 -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.
TIA
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com