MathGroup Archive 1997

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

Search the Archive

Until

  • To: mathgroup at smc.vnet.net
  • Subject: [mg7063] Until
  • From: Sean Ross <SEAN at mail.creol.ucf.edu>
  • Date: Sat, 3 May 1997 22:04:54 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Mathematica has a built-in While[test,body] stucture where the test is evaluated
and if true, body is evaluated until test fails.
I would like an Until structure where the body is evaluated until a test is
true.  Logically, 

Until[test_,body_]:=body:
                         While[Not[test],body]

but the above code doesn't work.  I am guessing it has something
to do with a Hold-type attribute, but I haven't been able to figure it out.  Does
anyone know how to conventiently make a new construct like the Until structure
above?  Related is how can I make my own function which will accept as an
argument an expression like Integrate accepts for its first argument?  Thanks.
Sean.


  • Prev by Date: MMA 3.0 buggy on NextStep/Intel?
  • Next by Date: Re: coefficient of constant term (Q:)
  • Previous by thread: Re: MMA 3.0 buggy on NextStep/Intel?
  • Next by thread: Re: coefficient of constant term (Q:)