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! > > > > >