|
[Date Index]
[Thread Index]
[Author Index]
Contexts and Naming of Things
- To: mathgroup at smc.vnet.net
- Subject: [mg25691] Contexts and Naming of Things
- From: Mike Yukish <may106 at psu.edu>
- Date: Thu, 19 Oct 2000 04:35:19 -0400 (EDT)
- Organization: Penn State University, Center for Academic Computing
- Sender: owner-wri-mathgroup at wolfram.com
I have the following code which does not work as I had hoped. I first
declare a function in a package...
BeginPackage["HSSV`cavity`"]
foo::usage = "now is the time..."
Begin["`Private`"]
bar;
nebbish;
foo[x_, y_] := 1 /; y === bar;
foo[x_, y_] := 2 /; y === nebbish;
End[]
EndPackage[]
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
|