Path: news.mathworks.com!not-for-mail
From: "Dave Robinson" <dave.robinson@somewhere.biz>
Newsgroups: comp.soft-sys.matlab
Subject: Re: do while
Date: Fri, 16 May 2008 13:45:03 +0000 (UTC)
Organization: STFC Rutherford Appleton Laboratory
Lines: 28
Message-ID: <g0k34v$4kb$1@fred.mathworks.com>
References: <g0gt2m$h3q$1@fred.mathworks.com> <g0hp1j$k93$1@fred.mathworks.com> <g0hq26$q1o$1@canopus.cc.umanitoba.ca> <g0ht07$k7a$1@fred.mathworks.com> <g0hthd$m6b$1@fred.mathworks.com>
Reply-To: "Dave Robinson" <dave.robinson@somewhere.biz>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210945503 4747 172.30.248.35 (16 May 2008 13:45:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 16 May 2008 13:45:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 968489
Xref: news.mathworks.com comp.soft-sys.matlab:468842


"helper " <spamless@nospam.com> wrote in message
<g0hthd$m6b$1@fred.mathworks.com>...
> > Alternately, you could use this:
> > 
> > done = false;
> > while ~done
> >     % your code
> >     if ~condition
> >         done = true;
> >     end
> > end
> 
> 
> Or another method
> 
> while true
>   % your code
>   if condition
>     break
>   end
> end

Am I missing something - how does this differ from my
original abomination?

Regards

Dave Robinson