Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

Namespaces/Context in Packages?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44791] Namespaces/Context in Packages?
  • From: Kastens at Hamburg.BAW.DE (Marko Kastens)
  • Date: Thu, 27 Nov 2003 11:38:15 -0500 (EST)
  • Organization: BAW-AK, Hamburg-Rissen, Germany
  • Sender: owner-wri-mathgroup at wolfram.com

Hi!

I'd like to use functions from other packages in my own package. How to do this?

I've tried:

BeginPackage["TestPackage`",{"Statistics`ContinuousDistributions`"}]

TestFunction::usage = "TestFunction[<list>]"

Begin["`Private`"];
TestFunction[list_]:=
{
	Mean[list]
}
End[];
EndPackage[]

The problem is, that Mean is not known in the Testfunction or - if the testfunction is declared outside private - I got the error-msg that Mean is shadowed by other packages.
Trying to use Statistics`ContinuousDistributions`Mean[list] doesn't work either.

Any suggestions?

Thanks,
marko


  • Prev by Date: Re: change of a coefficient in a polynomial
  • Next by Date: RE: here's one driving me mad!
  • Previous by thread: How to NOT convert Sin[x]/Cos[x] to Tan[x] ?
  • Next by thread: Mathematica 4.2 and Mandrake 9.2