MathGroup Archive 2006

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

Search the Archive

Re: mg67144: 3rd try!

  • To: mathgroup at
  • Subject: [mg67156] Re: mg67144: 3rd try!
  • From: jackgoldberg at
  • Date: Sun, 11 Jun 2006 02:17:09 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Hi again,

I am writing this after sending in a correction to the referenced post.  The correction is not yet posted, so if you will forgive me, here is the up-to-date version of my questions.

I have constructed a Module whose last line is 

L5=Apply[List, "a collection of equalities and inequalities such as the one given below"]

This Module returns something like this,

{x==y, -3<=u<=1,t==5}

If I set, bb = {x==y, -3<=u<=1,t==5} (outside the Module) and then use Replace all, say,


I get what I expect:   {x==y, -1, t==5}.  This leads me to the reasonable(?) conclusion that I could put this last step inside the Module.  So, my new Module looks like this (at the end)

L5=Apply[List, "..."];           (The quotes is to save space.  An expression is there.)
L6=L5/.{a_,q_,b_}->-1  ]        (and the Module ends.)

When the new version is run, the /. has no effect.  Why?  So it appears that the replacement rule which works outside the Module fails in the Module.  To add to my confusion, if  L6 is given this way,

L6=Position[L5,LessEqual[-3,u,1]]  ]

The Module returns  {}.

Help is needed.


  • Prev by Date: Re: Simple question from a biologist
  • Next by Date: Re: ? about Rule
  • Previous by thread: Re: List manipulation question
  • Next by thread: Re: mg67144: 3rd try!