Fwd: using functions with package name prefixed.
- To: mathgroup at smc.vnet.net
- Subject: [mg45638] Fwd: [mg45578] using functions with package name prefixed.
- From: Yasvir Tesiram <yat at omrf.ouhsc.edu>
- Date: Fri, 16 Jan 2004 19:57:31 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
> > Hi, > > Have you tried > > Boo`foo > > For example say I want to pack an array > > Developer`ToPackedArray[array] > > Yas > > On Jan 16, 2004, at 5:04 AM, steve_H wrote: > >> hi; >> >> is there a way to use a function from a package without loading >> the whole package, but by simply prefixing the package name to >> the function name? >> >> For an example, suppose we have a function foo in a packge called >> Boo.m >> >> Now, one must load the Boo package by typing something like >> >> Needs["`Boo"] >> >> then one can write >> >> foo >> >> But notice that when calling foo, the package name is not prefixed >> to >> it, hence one does not know in which package foo is in by looking >> at the function call. >> >> In Java for instance, I can write Boo.foo(), which makes it more >> clear where foo() is located. >> >> Is there a way to do something like this in Mathematica? and is there >> a way >> to only load the function that I need from the package without loading >> everything? >> >> thanks, >> Steve >