Re: newbie question on cobol syntax



On Mon, 23 Apr 2007 15:38:17 GMT, "William M. Klein"
<wmklein@xxxxxxxxxxxxxxxxx> wrote:

The only time that there is a "difference in logic flow" is when you MIX old
COBOL (with NEXT SENTENCE) *with* scope terminators (END-IF or whatever).
Therefore, if you are worried about "base of code" BUT are using newer compiler,
then feel "safe" in changing NEXT SENTENCE to CONTINUE.

Since my compiler allows such mixing - a bit of thinking is necessary
before such conversion.

Another place where CONTINUE is useful is replacing the exit command.
This facilitates the "D" in column 6 for debugging:

2000-READ-EXIT.
EXIT.

vs.
2000-READ-EXIT.
D DISPLAY "reached end of read paragraph".
CONTINUE.


My new code doesn't contain exit paragraphs, but when I maintain, I
try not to rewrite.
.



Relevant Pages

  • Re: [RFC] LZO de/compression support - take 3
    ... Lets just add the _unsafe postfix and leave "safe" alone, ... I don't like the symlink much either. ... I suspect it will probably damage performance unless the compiler is ...
    (Linux-Kernel)
  • Re: Qualifier "volatile" - probably OT.
    ... it's probably safe to assume that any C ... > compiler supports at least the entire C90 standard -- unless you have ... standard implementations, due to contractual obligations. ...
    (comp.lang.c)
  • Re: f() + g() * h()
    ... if it's a "safe" function that only ... How could the compiler prove that a function is safe to precompute at ... so external linkage might well not be an issue. ...
    (comp.lang.c)
  • Re: Type casting
    ... although it might seem to "work" with a given compiler. ... In this situation static_cast is appropriate because _you_ know it's safe. ... plus possibly esoteric linker option to support standard ...
    (comp.lang.cpp)
  • Re: Fast and Safe C Strings: User friendly C macros to Declare and use C Strings.
    ... We can have 'safe or fast'. ... storage address of every character I transfer by stupendous effort or ... checking built into the language definition, ... compiler can often eliminate many, probably most, of the checks. ...
    (comp.lang.c)