MathGroup Archive 2008

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

Search the Archive

Re: Difference between two commands.

  • To: mathgroup at
  • Subject: [mg90502] Re: Difference between two commands.
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at>
  • Date: Fri, 11 Jul 2008 02:02:50 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <g54ole$f0m$>

Budaoy wrote:

> What's the difference between these two commands: << and Needs?
> Sometimes we use <<Graphics` and sometimes we use
> Needs["ComputerArithmetic`"]. Where do they distinguish from each
> other?

Note that much as far packages are concerned, since, "Needs["context`"] 
calls Get["context`"]. By convention, the file loaded in this way is the 
one which contains a package that defines context`."

However, "Needs["context`"] loads an appropriate file if the specified 
context is *not* already in $Packages." (From the online help.)

Thus, Needs[] is more I/O efficient since it reads a package from the 
hard-drive only once.

On the other hands, Get will read a file on the hard-drive every time 
Get is called regardless whether the corresponding package is already in 

Also, Get can read dump saved as well as encoded files.

-- Jean-Marc

  • Prev by Date: Re: Re: Question about diference between Animate and
  • Next by Date: Re: Import/Export Problem
  • Previous by thread: Re: Difference between two commands.
  • Next by thread: Symbol function, a question