MathGroup Archive 2010

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

Search the Archive

Re: elementary questio about packages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108292] Re: elementary questio about packages
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Fri, 12 Mar 2010 07:14:27 -0500 (EST)
  • References: <hnakm4$5va$1@smc.vnet.net>

Am 11.03.2010 12:37, schrieb Francisco Gutierrez:
> Dear List: I made a package with a function that has a minimization.
> The minimization returns, as should be, the value of the
> optimization, and then the values of the variables, in the form
> {z1->10,z2->20,z3->50}.
> 
> In the notebook, this works perfectly well. In the package, however,
> the function throws back the variables in the form
> {contextname`z1->10,contextname`z2->20}. This is obnoxious, and makes
> the result much harder to utilize. How can I avoid this? I tried
> deleting Begin["`Private`"], but then  I got a completely crazy
> result. What should I do? Fg
> 
It's impossible to say with the information you gave. My guess is that
your function does not require the variables z1,z2,z3 as input or does
not handle these correctly internally. If your function does not require
the variable names you should not return some symbols that you created
within your code, there is no good reason to do so. If your function
accepts variable names and you still get contextname`z1 in your output,
you are doing something wrong within your code. In either case, if you
give an example of how your function is called and what it does you
might get more useful help...

hth,

albert


  • Prev by Date: Re: elementary questio about packages
  • Next by Date: Re: locally changing Options
  • Previous by thread: Re: elementary questio about packages
  • Next by thread: Re: elementary questio about packages