Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: "Richard" <riplin@xxxxxxxxxxxx>
- Date: 5 Jun 2005 14:11:08 -0700
> At some (IBM) mainframe shops with their '74 Standard compiler
A '74 compiler cannot have END-IF. Therefore there cannot be a NEXT
SENTENCE in an imperitive IF statement. NEXT SENTENCE would do no more
nor no less than what a CONTINUE does.
> there was (significant?) performance advantage in placing
> the "most commonly encountered" condition FIRST. Therefore, the
> "NEXT SENTENCE" construct 8did* perform better than the 2nd (which actually
> only has one test - no "ELSE").
That is complete nonsense. In a '74 compiler NEXT SENTENCE has nothing
to do with ordering conditions. It merely acted as a place holder when
there would otherwise be a null statement.
> I cannot remember what type of "object code" it created, but I do
> remember the need for such code. It is POSSIBLE that my memory has the "first
> condition - most common" and the "don't use negative logic" requirements mixed
> up, but it is my memory that that the first code performed better than the 2nd.
I think that you have these mixed up. You may well use NEXT SENTENCE
(or in a modern compiler CONTINUE) to avoid 'negative logic' but this
has nothing to do with 'first condition' or saving CPU cycles.
It also have _nothing_ to do with the abuse of using NEXT SENTENCE in
an imperitive IF (in '85) in order to jump to an anoymous point in the
midst of zero scope level code.
> There is NO doubt in my mind that they are "logicallly equivalent".
In other's minds, such as J4, one particular item you see as 'logically
equivalent' is marked "must not be specified".
> B) I do NOT object to anyone calling this (or anything else they want) "abuse"
You put up a pretty good approximation of that.
> C) I DO *disagree* with those who call "NEXT SENTENCE" with END-IF an ABUSE
> "because the Standard disallows it" - but do not call all OTHER (equally valid)
> extensions "abuse".
That is complete bullshit. I can label anything that _I_ want to as
abuse and I have provided good reasons why I do so, and it is not just
that it is marked "must not". If _you_ want other things to be called
abuse by you or anyone else then come up with your own _reasons_ for
doing that - without just making stuff up.
There is in fact no relationship between this being abuse and this
being an extension beyond that without the extension the compiler will
reject it. Whether I may or may not care about other constructs or
other extensions is irrelevant.
.
- Follow-Ups:
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: William M. Klein
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- References:
- interesting use of NEXT SENTENCE vs. CONTINUE
- From: Frank Swarbrick
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: Richard
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: docdwarf
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: Pete Dashwood
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: docdwarf
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: Pete Dashwood
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: William M. Klein
- interesting use of NEXT SENTENCE vs. CONTINUE
- Prev by Date: Re: interesting use of NEXT SENTENCE vs. CONTINUE
- Next by Date: Re: interesting use of NEXT SENTENCE vs. CONTINUE
- Previous by thread: Re: interesting use of NEXT SENTENCE vs. CONTINUE
- Next by thread: Re: interesting use of NEXT SENTENCE vs. CONTINUE
- Index(es):
Relevant Pages
|