MathGroup Archive 2000

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

Search the Archive

Contexts and Naming of Things

  • To: mathgroup at
  • Subject: [mg25691] Contexts and Naming of Things
  • From: Mike Yukish <may106 at>
  • Date: Thu, 19 Oct 2000 04:35:19 -0400 (EDT)
  • Organization: Penn State University, Center for Academic Computing
  • Sender: owner-wri-mathgroup at

I have the following code which does not work as I had hoped. I first
declare a function in a package...

foo::usage = "now is the time..."
foo[x_, y_] := 1 /; y === bar;
foo[x_, y_] := 2 /; y === nebbish;

And then try to run the following simple commands...

foo[1, bar]
foo[1, cavity`bar]
foo[1, HSSV`cavity`bar]

I had thought that the first one would have given me the correct answer,
as it works OK when I do not embed the function definition in a package.
The others were desperate second efforts that also failed. What am I
missing here?

  • Prev by Date: Statistics book advice
  • Next by Date: Re: Assumptions i Mathematica...
  • Previous by thread: Re: Statistics book advice
  • Next by thread: Re: Contexts and Naming of Things