Path: news.mathworks.com!newsfeed-00.mathworks.com!NNTP.WPI.EDU!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: go to statment in matlab
Date: Thu, 28 Feb 2008 17:48:05 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 26
Message-ID: <fq6s4l$sdm$1@canopus.cc.umanitoba.ca>
References: <f9f08u$qqp$1@fred.mathworks.com> <fae87n$651$1@fred.mathworks.com> <fafckm$mbc$1@canopus.cc.umanitoba.ca> <fq6nrs$kq0$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1204220885 29110 192.70.172.160 (28 Feb 2008 17:48:05 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Thu, 28 Feb 2008 17:48:05 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:454353


In article <fq6nrs$kq0$1@fred.mathworks.com>,
James  <kilrogg311@yahoo.com> wrote:
>> I've been programming for 30 years. I think the last time 
>that
>> I needed a GOTO construct was about 18 years ago, 
>cleaning up
>> some Fortran code that had been under development by 
>random students
>> for 20 years.

>I know this is old, but I'm eagerly looking forwards to the 
>addition of GOTO to MatLab.  

>One simple reason:  It's fast.  Really fast.  I work with 
>people who do real-time data collection using MatLab and 
>need to iterate through loops in the range of milliseconds 
>or less.  GOTO's can really help when you need to pare your 
>code down to nothing!

a GOTO in MATLAB would not necessarily be very fast: it might have
to visit all of the statements in-between. You can see this effect
if you profile an if/else construct: even when the else clause
is never taken, the profiler will ascribe time to it.
-- 
  "Is there any thing whereof it may be said, See, this is new? It hath
  been already of old time, which was before us."    -- Ecclesiastes