Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: ReplaceAll in If Statement

  • To: mathgroup at
  • Subject: [mg19470] Re: [mg19448] ReplaceAll in If Statement
  • From: "Carl K.Woll" <carlw at>
  • Date: Sat, 28 Aug 1999 15:53:02 -0400
  • Organization: Department of Physics
  • References: <>
  • Sender: owner-wri-mathgroup at


Your definition of opList should not have the braces. Try



Carl Woll
Dept of Physics
U of Washington

Tom Compton wrote:

> In the following sequence I expected z to evaluate to 1 in the
> Module.  It appears that the test in the module does not
> evaluate to either True or False.  I don't understand why.
> Can anyone explain?
> In[1]:=
> opList={a->True};
> In[2]:=
> test[opts___]:=Module[{},
> If[a /. {opts}, z=1, z=2, z=3];
> {a, z} /. {opts}]
> In[3]:=
> test[opList]
> Out[3]=
> {{True,3}}
> Tom Compton

  • Prev by Date: Re: unevaluatedsdi integral
  • Next by Date: Re: Finding Solution to Set of Equations with Inequality Constraints
  • Previous by thread: Re: ReplaceAll in If Statement
  • Next by thread: Re: ReplaceAll in If Statement