MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Problem in loading packages in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70684] Re: [mg70655] Re: Problem in loading packages in Mathematica
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Mon, 23 Oct 2006 02:50:10 -0400 (EDT)
  • References: <eha5iq$b7f$1@smc.vnet.net> <ehcp0r$sma$1@smc.vnet.net> <200610220519.BAA04755@smc.vnet.net>

> I believe that in newer versions of Mathematica (certainly 5.x, maybe
> earlier),  loading a package with <<  does exactly the same thing as
> Needs

We probably all know this, but I just wanted to point it out anyway:

Needs checks $Packages before loading a context. If the context is
already loaded, it will skip the context. As a result, if the author
makes changes to a package file, and then attempts to reload the
package using needs, the changes will not take effect. Get loads the
file every time.

On 10/22/06, Helen Read <hpr at together.net> wrote:
> dimmechan at yahoo.com wrote:
> > Amit you did a very common mistake for beginners
> >
> > You use the ( ' ) key  instead of the correct (`) key!
> >
> > Try the following command and everything is ok.
> >
> > << Statistics`NormalDistribution`
> >
> > Following also one of the invaluable suggestions of David Park
> > I recomend you to use the following command in order to load the
> > package.
> >
> > Needs["Statistics'NormalDistribution`"]
>
> I believe that in newer versions of Mathematica (certainly 5.x, maybe
> earlier),  loading a package with <<  does exactly the same thing as
> Needs, and there is no problem with loading twice the way there used to
> be. I have had problems getting Needs to work on some systems, and have
> gone over completely to << with no problems whatsoever.
>
> (And oops, look at your typing error in your example of Needs -- you
> made the same mistake you were helping Amit to fix!)
>
> --
> Helen Read
> University of Vermont
>
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: Using "=" vs ":="
  • Next by Date: RE: Re: Plot3D question
  • Previous by thread: Re: Problem in loading packages in Mathematica
  • Next by thread: Re: Problem in loading packages in Mathematica