Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!t46g2000cwa.googlegroups.com!not-for-mail
From: "Rune Allnor" <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to do GOTO in Matlab
Date: 15 Dec 2006 10:39:40 -0800
Organization: http://groups.google.com
Lines: 44
Message-ID: <1166207980.367759.127610@t46g2000cwa.googlegroups.com>
References: <1165778984.266098.310630@73g2000cwn.googlegroups.com>
NNTP-Posting-Host: 82.148.155.70
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1166207987 22583 127.0.0.1 (15 Dec 2006 18:39:47 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 15 Dec 2006 18:39:47 +0000 (UTC)
In-Reply-To: <ef4839d.0@webcrossing.raydaftYaTP>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: t46g2000cwa.googlegroups.com; posting-host=82.148.155.70;
Xref: news.mathworks.com comp.soft-sys.matlab:384037




per isakson skrev:
> daniel_nordlund_1982 wrote:
> >
> >
> > I've seen many people on this newsgroup ask for a GOTO statement.
> > Since
> > such a statement doesn't exist, I've decided to help MathWorks
> > implement one.

>
> Mathworks has announced a goto function: "Vectorized goto in MATLAB"
> [ <http://blogs.mathworks.com/loren/?cat=1> ].
>
> How does your function compared to Mathwork's plans?

Please, tell me you've delayed your April fool's day pranks till now?

Did it occur to anyone that there might be a reason why GOTO's
don't exist in any high-level programming language designed for
almost half a century?

And this idea presented on the mathworks blog: Instead of using
labels to designate where a GOT jump should land, the LINE
NUMBER of the source code or the CONTENTS of the line
of source code should designate the destination?

Two *tiny* objections come to mind:

1) How would somebody be able to maintain source code integrity
with line numbers as keys for destinations? What happens if
somebody inserts a couple of lines of code or comments after
the GOTO jump has been programmed?

2) What happens if somebody in, say, debugging find that the
contents of the line where the GOTO jump is destined to arrive
needs to change?

If TMW actually implements these modifications, they will
reach the dubious achievemnets of obfuscating GOTO statements
orders of magnitude beyond what even FORTRAN was able to.

Rune