Re: COBOL ain't quite dead - yet !



On Oct 30, 6:27 am, Howard Brazee <how...@xxxxxxxxxx> wrote:
I have seen

PERFORM AAA THRU AAA-EXIT.

AAA SECTION.
AAA-PARAGRAPH.
...
AAA-EXIT.
EXIT.

I hate that, but apparently it works. When I maintain this,
sometimes I will replace the EXIT. with CONTINUE, when I add debugging
statements.

I wonder what various compilers would do if an 'EXIT SECTION' were in
there. This would go to a point beyond the end of AA-EXIT. An 'EXIT
PARAGRAPH' would work, but it is a section that is being performed.

I prefer to use styles which can be validated. It may be possible to
write a program that would warn when your example is used but it seems
that the compiler would not give any message if the EXIT SECTION would
cause the program to run amuck.

By eliminating styles that could lead to simple coding errors (such as
your example) the programs can be more reliable and faster to develop.




.



Relevant Pages

  • Re: Is it possible to use the value of the PROGRAM ID within the source code?
    ... This was used by some compilers to generate null code that ... I can't recall a mandatory EXIT, even on the earliest IBM compilers. ... >paragraph without a statement until the '74 standard. ... During meetings to formulate a Programming Standard, ...
    (comp.lang.cobol)
  • Re: if clause
    ... 3: if (permission < operator) ... Some people think a function should have just ONE clear exit ... We have a whole runtime-enabled logger system so, as long as you log the entry and exit, debugging is easy and the code is easy to read. ... I'm speaking as someone who might not be able to run a debugger on live code (I maintain chunks that are compiled with older compilers that have crufty debuggers that don't run on later releases of Windows, ...
    (comp.lang.c)
  • Re: Is it possible to use the value of the PROGRAM ID within the source code?
    ... The EXIT statement was there to cater for the very early compiler code ... While not all compilers required this, it certainly was the case with ... some compilers that I worked with that pre-dated the '68 standard, ... paragraph without a statement until the '74 standard. ...
    (comp.lang.cobol)
  • Re: Semi-portable Fortran exit codes?
    ... I spent the morning researching how to get exit codes ... from Fortran programs despite the lack of help from ... the Fortran standard. ... Depending on what vintage compilers you need to support, ...
    (comp.lang.fortran)
  • Re: GOBACK (was: Perform Thru/Go to vs. Perform - Compile Speed
    ... What is the relationship between "most compilers" and "most source lines and ... logic touched in the US and Canada"? ... I bet there are a lot of those Mainframe CoBOL source programs using ... alternatives to GOBACK, such as CALL EXIT. ...
    (comp.lang.cobol)