MathGroup Archive 2006

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

Search the Archive

Re: Problem in evaluating functions from my own package!!!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67602] Re: Problem in evaluating functions from my own package!!!
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Sat, 1 Jul 2006 05:13:34 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 6/30/06 at 4:15 AM, abdou.oumaima at hotmail.com wrote:

>I put my "spaceMaths" folder into "C:\Documents and
>Settings\Lian\Application Data\Mathematica\Applications".

>I delete the ligne 'SetDirecory["I:\spaceMaths"]' and Modify
>'BeginPackage["spaceMaths`METHODECN`"]'.

Why are you using this syntax instead of the simpler

BeginPackage["METHODECN`"]

Using the syntax you have above you are asking Mathematica to create a sub-context within the context "spaceMaths". Is this what you want? That really isn't needed to load a set of functions to be grouped into a common context.

>When I call my package, I get this error msg:

>Needs::nocont: Context spaceMaths`METHODECN` was not created when
>Needs was evaluated. I'm really sad for that. But I still looking
>for to resolve it.

One way to get this error is for there to be a mis-match between the path to the .m file and the context path set up by the package.

For example, in previous versions of his RootSearch package, Ted Ersek set up the context as Enhancements`RootSearch` and I put the RootSearch.m file in a directory Enhancements along one of the search paths returned by evaluating $Path. In the current version, Ted has set up the context as Ersek`RootSearch`. But I have not changed my directory structure or $Path variable. As a consequence, if I do

Needs["Enhancement`RootSearch`]

I will get the error you describe above. But the package is loaded.

Since I normally load packages using the syntax

<<Enhancements`RootSearch`

at the beginning of session, I do not see this error message and I've not bothered to either change my directory structure or the package code to eliminate the mis-match in pathnames and the error message.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Forcing a parameter to be integer when using 'Integrate'
  • Next by Date: RE: when dimension increases
  • Previous by thread: Re: RE: Re: Re: Limit of an expression?
  • Next by thread: RE:Problem in evaluating functions from my own package!!!