MathGroup Archive 2002

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

Search the Archive

Package function variable hiding.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38503] Package function variable hiding.
  • From: Nigel King <king at dircon.co.uk>
  • Date: Fri, 20 Dec 2002 04:27:35 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

In the following minimised package func does not do what I want. I want 
'test' to "see" NoncentralChiSquareDistribution. Instead it creates a 
'Private' version. What am I doing wrong?

In[1]:= BeginPackage["test`", "Statistics`ContinuousDistributions`"]; In[
2]:= Needs["Statistics`ContinuousDistributions`"]; In[3]:= func::usage :
= "func[k] a useful function" In[4]:= Begin["`Private`"]; In[5]:=
\!\(\(
func[mask_?NumericQ] := 
      10  Log[10, 
          Quantile[
            
NoncentralChiSquareDistribution[2, 
              2\ 10\^\((\((30 - mask)\)/
20)\)], 0.0001]];\)\) In[6]:= End[]; In[7]:= EndPackage[]; In[8]:= func[
10] Out[8]=
\!\(\(\(1\/Log[10]\)\((10\ Log[
        
test`Private`Quantile[NoncentralChiSquareDistribution[2, 20], 
          
0.0001`]])\)\)\) In[9]:= Context[NoncentralChiSquareDistribution] Out[9]
=
"Statistics`ContinuousDistributions`"

TIA
---
Nigel King


  • Prev by Date: Polynomial GCD and LCM over a Field
  • Next by Date: Re: portable issues with zip files
  • Previous by thread: Re: Polynomial GCD and LCM over a Field
  • Next by thread: Re: Package function variable hiding.