Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: "Pete Dashwood" <dashwood@xxxxxxxxxxxxxx>
- Date: Tue, 7 Jun 2005 11:23:56 +1200
"Howard Brazee" <howard@xxxxxxxxxx> wrote in message
news:d81md9$pmu$1@xxxxxxxxxxxxxxxxxxxxxxx
>
> On 5-Jun-2005, "Pete Dashwood" <dashwood@xxxxxxxxxxxxxx> wrote:
>
> > My advice: Don't use NEXT SENTENCE.... ever. It is a stupid and
unnecessary
> > inclusion in the COBOL language. It is NEVER required, UNLESS you (or
your
> > installation) forbids the use of negated conditions.
>
> Why is it required then?
It isn't. And it has been dropped from the 02 standard (not that I really
care about that...)
>
> I'm a big proponent of using the
>
>
> IF (complicated condition)
> CONTINUE
> ELSE
>...
> END-IF.
> construct for some conditions. In Olden Dayze, I would have used NEXT
> SENTENCE, but don't need to anymore.
CONTINUE is not what we are discussing, and there is a subtle difference
between CONTINUE and NEXT SENTENCE anyway.
I totally respect your right to be a proponent of any coding style you like.
My contention is that NEXT SENTENCE is NEVER required.
You could eliminate the ELSE AND the CONTINUE from the above by simply
coding:
> IF NOT (complicated condition)
> ...code that previously appeared btween ELSE and ENDIF...
> END-IF
>
It is less code to write, less code to run and arguably cleaner.
However, I agree that it is a matter of style, and, as already pointed out,
I would not ENFORCE this manner of coding on anybody. (I embrace it gladly
myself, but that's just me...)
Pete.
.
- Follow-Ups:
- Re: interesting use of NEXT SENTENCE vs. CONTINUE
- From: Chuck Stevens
- 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: William M. Klein
- 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: Howard Brazee
- interesting use of NEXT SENTENCE vs. CONTINUE
- Prev by Date: Re: Disappearing data on screen
- 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):