Re: Is it possible to use the value of the PROGRAM ID within the source code?

From: Robert Wagner (robert.deletethis_at_wagner.net)
Date: 06/24/04


Date: Wed, 23 Jun 2004 23:51:54 GMT

riplin@Azonic.co.nz (Richard) wrote:

>robert.deletethis@wagner.net (Robert Wagner) wrote

>The EXIT statement was there to cater for the very early compiler code
>to act as a 'place holder' for the PERFORM return code. Wherever the
>end of a PERFORM was required an EXIT has to be coded in its own
>paragraph. This was used by some compilers to generate null code that
>was replaced by return code by the PERFORM statement. The PERFORM
>would then tidy up by making it null again so it would drop thru if
>necessary.
>
>While not all compilers required this, it certainly was the case with
>some compilers that I worked with that pre-dated the '68 standard,
>such as ICT's XE13.

I can't recall a mandatory EXIT, even on the earliest IBM compilers.

>Your assertion that it was for 'commented out paragraphs' is nonsense
>because there was no mechanism to 'comment out code' that left a
>paragraph without a statement until the '74 standard.
>
>The '74 standard introduced the '*' in column 7. Previously it would
>be done by the NOTE statement which did not leave the paragraph empty
>at all.

I recall that on the IBM 7090/7040 compiler, circa. 1960. Also 1401 from the
same era. By 1965, on the S/360, I'm reasonably sure it offered * in column 7
as an alternative to NOTE. Does anyone remember?

>> Now you've stepped in cow dung. NOTE was deleted from the Standard for good
>> reason -- it was a bugtrap.
>
>It was deleted when the '*' was added to replace it. When the EXIT
>was 'constructed' the only standard 'comment out' was NOTE, which did
>not leave the paragraph 'empty' and thus did not require an 'EXIT' as
>you claim.

Funny story about NOTE. In the late '60s I worked for a programming manager who
was a real jerk. During meetings to formulate a Programming Standard, I
suggested "Every paragraph must start with a NOTE explaining what it does." He
bought the idea and published it in the Standard. Programmers were giggling and
giving me high-fives.

His tenure was short-lived. I replaced him a month later. His "V. 'Duke' Smith
Programming Standards Manual" occupied an honored space in our library.



Relevant Pages

  • 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: Cant understand this! (Help required please)
    ... Yes and some online courses NETG does not seem to understand what ... > New to programming: ... I have heard of comeau don't they make compilers too? ... An argument I have used many times myself, I want to learn standard C++, ...
    (alt.comp.lang.learn.c-cpp)
  • Re: GCC
    ... The header names changed explicitly to ... The Standard says that the standard ... that did not put iostream into the std namespace. ... and compilers change along with them. ...
    (Debian-User)
  • Re: If you were inventing CoBOL...
    ... I can't get COBOL to produce a *floating* version of the most common ... EXIT PARAGRAPH and EXIT SECTION provide good support for structure ... disallowed in other contexts in the '02 standard. ... EXIT PARAGRAPH and EXIT SECTION are big helps here. ...
    (comp.lang.cobol)
  • Re: Is C99 the final C? (some suggestions)
    ... I for one would be happy if more compilers would ... this would require would be a standard minimum mantissa length. ... > supported by a mandatory compiler warning). ... > calls invocations that an implementation needs to support. ...
    (comp.lang.c)