MathGroup Archive 1997

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

Search the Archive

Re: DeclarePackage in Mathematica 2.2 for Windows

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5636] Re: DeclarePackage in Mathematica 2.2 for Windows
  • From: marliesb at sci.kun.nl (Marlies)
  • Date: Wed, 1 Jan 1997 21:05:01 -0500
  • Organization: University of Nijmegen, The Netherlands
  • Sender: owner-wri-mathgroup at wolfram.com

Clemens replied to my posted article and asked me to send it to the
Mathematica-newsgroup:

Hi Marlies!

Look at the following template package:

  (* Beginning of package *)
  BeginPackage["MyPackage`"]
  f::usage="dummy comment for declaration"

  Begin["`Private`"]
  f := (* Definition of function f *)
  End[]

  EndPackage[]
  (* End of Package *)
Then by declaring

DeclarePackage[ "MyPackage`", {"f"} ]

in your current Mathematica 2.2-Session and having the position
of the file mypackag.m (no typing-error: filename is name of context
cut to 8 characters !) in the current search path (either by setting
$Path or by decaring the directory as your current one by
SetDirectory[...])  you achieve the following:
Once the function f is required in the Mathematica-Session, the
Package mypackag.m is read in and worked through, so that f is defined.

This feature can help you in defining master-packages for a bunch of
in some way correlated package-files. Look at the subdirectories of the
package-directory in your Mathematica-installation. There's always a
master-
package with only DeclarePackage-functions in it.

Hope I could help.
Please send this message to the Mathematica-newsgroup.
Currently I cannot do this..

Clemens

(-: Clemens.Frey at uni-bayreuth.de :-)




  • Prev by Date: Mathematica 2.2 and NT4.0
  • Next by Date: Re: How to get 2.334E+6 output form ?
  • Previous by thread: Re: Mathematica 2.2 and NT4.0
  • Next by thread: Re: How to get 2.334E+6 output form ?