[Date Index] [Thread Index] [Author Index]
Re: how call a function by same name in 2 different contexts?
On May 3, 2005, at 11:34 PM, steve wrote: > > I was expecting this output > > Context["FourierTransform"] > SignalProcessing`Support`SigProc` > System` Names["*`FourierTransform"] or ?*`FourierTransform > > So that I can see where each function is and then call any one > I want without ambiguity. > > Any idea how to handle all of this stuff? I do not think it is nice > that one package hides away another function of the same name in > different package. The whole idea of using packages is so that this > sort of thing should not happen ! I cannot see a good way to avoid this. How is Mathematica supposed to know which function you want to use at any particular point? What the package mechanism should ensure is that the packages aren't confused. That is if 2 packages have the same symbol, then package A should never use package B's symbol. You can add new, unambiguous symbols that point to these definitions. Something like: SigTransForm = SignalProcessing`Support`SigProc`FourierTransform SysTransForm = System`FourierTransform Ofcourse, all this does is save on typing. > Is there a way to unload a specific package after loading it without > having to restart Mathematica to clean things out? > > Thank you for any insight into this issue > nma124 Perhaps http://library.wolfram.com/infocenter/MathSource/602/ ---------------------------------------------- Omega Consulting The final answer to your Mathematica needs. http://omegaconsultinggroup.com