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: goto and label (cont)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57889] Re: goto and label (cont)
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Sat, 11 Jun 2005 03:35:49 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 6/10/05 at 2:29 AM, carlw at u.washington.edu (Carl K. Woll) wrote:

>"Bill Rowe" <readnewsciv at earthlink.net> wrote in message
>news:d892ej$sa3$1 at smc.vnet.net...
>>The same functionality as a do while loop can be implemented in
>>Mathematica as a While loop as follows:

>>While[True, do something; If[test, Break[]]]

>A simpler way to get the functionality of a do while loop is to use
>the single argument form of While:

>While[
>do something; test]

>Ray Koopman used this construction in a very nice way to get the
>functionality of Guy's spaghetti code. I quote his construction
>below:

Yes, I saw his post. In addition, he takes advantage of the documented execution order for an Or which yeilds a particularly elegant solution. Much nicer than mine.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: "expanding a list"
  • Next by Date: Re: "expanding a list"
  • Previous by thread: Re: goto and label (cont)
  • Next by thread: Output from Export[ ] (suggestion to Wolfram)