MathGroup Archive 2008

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

Search the Archive

Re: How to use package without manually evaluating?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90570] Re: How to use package without manually evaluating?
  • From: "Jeremy Conlin" <jeremit0 at gmail.com>
  • Date: Sun, 13 Jul 2008 15:49:02 -0400 (EDT)
  • References: <000001c8e40e$2d9bcf00$88d36d00$@net>

On Sat, Jul 12, 2008 at 6:58 AM, David Park <djmpark at comcast.net> wrote:

>  Jeremy,
>
>
>
> The way that I would do it is:
>
>
>
> 1) Create a MyApplication (or whatever name you wish) folder in your
> $UserBaseDirectory/Applications folder.
>
> 2) Make your posted file a Matrices.nb notebook file. Make each of the
> cells an Initialization cell.
>
> 3) Change the BeginPackage statement to:
>
>
>
> BeginPackage["MyApplication`Matrices`"]
>
>
>
> 4) Save the notebook as an "Auto Generated Package" in your MyApplications
> folder. (If it already exists as a notebook you can use the Options
> Inspector to do this.) This automatically creates the Matrices.m file and
> anytime you edit and save the Matrices.nb notebook, the Matrices.m package
> file will be updated.
>
>
>
> 5) Load the package with the statement:
>
>
>
> Needs["MyApplication`Matrices`"]
>
>
>
> You could make that statement an Initialization cell in your working
> notebooks. But when you save those notebooks DON'T  make them Auto Generated
> Packages.
>
>
>
> Generally your private Applications folder is the best place to put
> packages. Mathematica automatically knows how to find them there. You may
> not want this package loaded EVERY time you use Mathematica. I haven't
> examined you package code completely but it seems that you have written some
> routines that don't have usage statements. You need a usage statement for
> each routine you want to export and have access to.
>
>
>

Thanks for the information.  I didn't realize I need a usage statement for
the function to be exported.   I'll try your suggestions and report back if
I don't succeed.

Jeremy



  • Prev by Date: Re: Question about diference between Animate and Manipulate
  • Next by Date: Re: FindMinimum
  • Previous by thread: Re: How to use package without manually evaluating?
  • Next by thread: Re: How to use package without manually evaluating?