Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: Problem with MatchQ and SameQ

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56454] Re: Problem with MatchQ and SameQ
  • From: dh <dh at metrohm.ch>
  • Date: Tue, 26 Apr 2005 01:32:57 -0400 (EDT)
  • References: <d4hvke$1i1$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Miguel,
It seems to me that you put "Implicit" in the wrong context.
Unfortunately you did not write how you set up your packages. But if you 
did it the standard way, you will have a 
context:"Calculus`MyProgramm`Private`" with all the private variables. 
But "Implicite" should be created in the context: 
"Calculus`MyProgramm`". You usually do this by defining an usage 
message, e.g.:
Implicite::usage="some text";
inside the context: "Calculus`MyProgramm`, but outside the context: 
"Calculus`MyProgramm`Private`".

Sincerely, Daniel

Miguel wrote:
> Hi,
> Normally I operate with Mathematica 5.0. The functions MatchQ and
> SameQ work well  in a notebook but don't it in a programm.
> 
> For example,in a notebook
> Clear[f];
> In[1]: f[x_,y_,option_]:=
>   If[MatchQ[option,SolutionForm->Explicit],x+y,
>     If[MatchQ[option,SolutionForm->Implicit],x*y],Print["Eror"]]
> 
> In[2]:
> f[2,3,SolutionForm->Implicit]
> Out[2]:
> 6
> It works well.
> 
> In my programm,
> 
> <<Calculus`MyProgramm`
> In[3]:
> f[2,3,SolutionForm->Implicit]
> Out[2]:
> Error
> 
> Thanks
> 


  • Prev by Date: Re: multiple choice IF condition
  • Next by Date: Re: Random points in NIntegrate
  • Previous by thread: Re: Problem with MatchQ and SameQ
  • Next by thread: diagonalizzation routine