MathGroup Archive 2000

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

Search the Archive

2nd arg to BeginPackage

  • To: mathgroup at
  • Subject: [mg24760] 2nd arg to BeginPackage
  • From: Daniel Reeves <dreeves at>
  • Date: Wed, 9 Aug 2000 02:32:45 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

My first question is, there seems to be a discrepancy between the
documentation for BeginPackage:
  BeginPackage["Package`", {"Needed1`", "Needed2`", ...}]
vs how standard packages use it:
  BeginPackage["Package`", "Needed1`", "Needed2`", ...]

My next question is, why doesn't either form do what I expect here:

BeginPackage["TestPkg`", "Statistics`"];
ff::usage = "Some function that uses CDF."
ff[a_] := CDF[NormalDistribution[0,1], a]
End[];   (* Private context *)

In the definition of ff, it thinks the context for CDF (and
NormalDistr) is TestPkg`Private` instead of Statistics`...

How can I avoid spelling out the contexts for things like CDF?

Thanks a lot,
Daniel Reeves

--    --    --    --    --    --    --    --    --    --    --    -- 
Daniel Reeves     

"You think you know when you learn, 
 are more sure when you can write, 
 even more when you can teach, 
 but certain when you can program."  -- Alan Perlis

  • Prev by Date: Re: A Functional Programming Question
  • Next by Date: Re: Real roots of polynomials
  • Previous by thread: Re: Re: Correlation function and data
  • Next by thread: Re: 2nd arg to BeginPackage