MathGroup Archive 2003

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

Search the Archive

RE: Re: loading packages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42182] RE: [mg42165] Re: loading packages
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sat, 21 Jun 2003 20:57:00 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Paul,

Well he had to load something first. Forgetting to load the package is
certainly a common error with beginners - and others.

But your second point I find very instructive. I think that "written
correctly" means to Unprotect all of the exported names right after the
BeginPackage statement, assuming that the package protects them at the end.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

From: Paul Abbott [mailto:paul at physics.uwa.edu.au]
To: mathgroup at smc.vnet.net


In article <bcmoa1$slg$1 at smc.vnet.net>,
 "David Park" <djmp at earthlink.net> wrote:

> You absolutely have to load the package first!

Actually this is not true. Instead you can just load the package stubs
using

   << Graphics`

This will cause the appropriate Graphics package to be loaded as
required. This approach is often more useful than loading a specific
package.

> It is also generally better to use Needs statements than << statements.
They
> can be reevaluated without causing any problems.

This is only true and required if the package itself has not been
written correctly. Re-loading a package _should_ work properly.

Cheers,
Paul

--
Paul Abbott                                   Phone: +61 8 9380 2734
School of Physics, M013                         Fax: +61 8 9380 1014
The University of Western Australia      (CRICOS Provider No 00126G)
35 Stirling Highway
Crawley WA 6009                      mailto:paul at physics.uwa.edu.au
AUSTRALIA                            http://physics.uwa.edu.au/~paul


  • Prev by Date: Re: Re: loading packages
  • Next by Date: RE: RE: Find a good function for fitting data
  • Previous by thread: Re: Re: Re: loading packages
  • Next by thread: Re: loading packages