MathGroup Archive 2009

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

Search the Archive

Re: Needs[], BeginPackage[], filename

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101084] Re: Needs[], BeginPackage[], filename
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 23 Jun 2009 07:08:28 -0400 (EDT)
  • References: <h1neuc$8r1$1@smc.vnet.net>

Hi,

ContextToFileName["context"] gives the string specifying the file \
name that is by convention associated with a particular context.

and you can overwrite it for your package.


Or just name the package as suggested by the Mathematica conventions.

Regards
   Jens


Scot T. Martin wrote:
> Needs[] allows the context and filename to be specified.
> 
> BeginPackage[] allows a context and not a file name.
> 
> Then, my packages require two steps, as in the following example:
> 
> ** start **
> 
> Needs["sizedistribution`", "size functions.m"]
> 
> BeginPackage["tandemdma`", {"sizedistribution`"}]
> 
> ** stop **
> 
> Are two steps really necessary or am I missing something very simple?
> 
> My goal would be to just forego Needs[] and handle everything in one step 
> with BeginPackage, but I cannot figure out a way to feed the filename to 
> BeginPackage[].
> 
> I had a search on the MathArchives, but I did not succed in locating any 
> material addressing this question.
> 
> Thanks for any quick hints!
> 
> 
> 
> 
> 


  • Prev by Date: Re: Needs[], BeginPackage[], filename
  • Next by Date: Re: Two questions about modification of a matrix.
  • Previous by thread: Re: Needs[], BeginPackage[], filename
  • Next by thread: Re: Needs[], BeginPackage[], filename