Re: newbie question on cobol syntax
- From: "William M. Klein" <wmklein@xxxxxxxxxxxxxxxxx>
- Date: Mon, 23 Apr 2007 15:34:58 GMT
"Howard Brazee" <howard@xxxxxxxxxx> wrote in message
news:1hhp23lrbejcmn16429hp0pthh40pmn5fn@xxxxxxxxxx
On Sun, 22 Apr 2007 23:52:11 GMT, "William M. Klein"<snip>
<wmklein@xxxxxxxxxxxxxxxxx> wrote:
Some compilers will allow
If Field-1 = A
Next Sentence
Else
Display "Here"
End-IF
Display "There".
In which case "Next Sentence" still goes to the next sentence. I
see no advantage in ever using NEXT SENTENCE now that CONTINUE is
available.
Howard,
I know that you know this, but just in case some "newbie" (see subject line
doesn't) this is the reason that understanding Next Sentence vs Continue is
importaat (if your compiler supports this extension).
If Field-1 = A
Next Sentence
Else
Display "Here"
End-IF
Display "There"
.
Display "Some Place Else
.
Display "Still another logic branch
.
yields different results from
If Field-1 = A
Next Sentence
Else
Display "Here"
End-IF
Display "There"
* no period
Display "Some Place Else
.
Display "Still another logic branch
.
And neither of the above is the same as
If Field-1 = A
Continue
Else
Display "Here"
End-IF
Display "There"
.
Display "Some Place Else
.
Display "Still another logic branch
.
* * * * *
As most people (but not all) agre, "mixing" next sentence with scope delimiters
is NOT a good thing to do.
--
Bill Klein
wmklein <at> ix.netcom.com
.
- Follow-Ups:
- Re: newbie question on cobol syntax
- From: Howard Brazee
- Re: newbie question on cobol syntax
- References:
- newbie question on cobol syntax
- From: Mayer
- Re: newbie question on cobol syntax
- From: William M. Klein
- Re: newbie question on cobol syntax
- From: Howard Brazee
- newbie question on cobol syntax
- Prev by Date: Re: newbie question on cobol syntax
- Next by Date: Re: newbie question on cobol syntax
- Previous by thread: Re: newbie question on cobol syntax
- Next by thread: Re: newbie question on cobol syntax
- Index(es):
Relevant Pages
|