For Programmers: Free Programming Magazines  


Home > Archive > Cobol > June 2004 > Re: Is it possible to use the value of the PROGRAM ID within the









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Is it possible to use the value of the PROGRAM ID within the
Warren Simmons

2004-06-25, 6:50 pm

And you should not. If you can arrange it, find a way
to review code before it is approved for installation.
Considering the things that are done to optimize code,
it seems resonable to me, to specify such a check in the
pre processor of the compiler.

Warren Simmons

Joe Zitzelberger wrote:

> In article <10dei1ic805ka30@corp.supernews.com>,
> "Rick Smith" <ricksmith@mfi.net> wrote:
>
>
>
> I suspect you are correct. I have only yet read a 1977 ACM paper by
> Yourdon, but he does not look like the THRU/EXIT author in it. For some
> reason I had a vague memory of a STEVENS or a JOHNSON or a SMITH that
> had written about Cobol specific structured programming with the
> THRU/EXIT style.
>
>
>
>
>
> You are quite correct. That was quite responsible use of the GO TO
> verb. My only concern is maintenance -- something the academics never
> mention when they design styles and methodologies. I suspect that if
> you put the following into production:
>
> LOOP-REPEAT.
> statement.
> statement.
> IF NOT condition GO TO LOOP-REPEAT.
>
> After several iterations of maintenance you might find it looking like:
>
> LOOP-REPEAT.
> statement.
> IF 3am-fix = 'Y' GO TO WILD-BRANCH.
> statement.
> IF new-project = 154 GO TO OTHER-PLACE.
> statement.
> IF NOT condition GO TO LOOP-REPEAT.
>
> While it might be caught by a code review, the problem is that people
> who would be likely to code the above are exactly the people who will
> not be able to understand the difference between the first, responsible,
> use of GO TO and the subsequent, irresponsible uses.
>
> I just do not trust programmers to maintain responsible use of GO TO.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com