Re: interesting use of NEXT SENTENCE vs. CONTINUE




"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.






.