Re: Perfrom Thru

From: Richard (riplin_at_Azonic.co.nz)
Date: 03/16/04


Date: 16 Mar 2004 12:26:24 -0800

Pierra <pierra@sprynet.com> wrote

> I disagree (IMHO) in that the PERFORM_THRU provides a very clear
> definition of what you want to do. Having said that, a PERFORM
> 1000-START THROUGH 5000-EXIT is one of the confusing and improper things
> to do. Should be PERFORM 1000-START THRU 1000-EXIT ONLY!

That is just one of the problems that occurs with PERFORM TRHU. It
may be that the 1000-Exit was meant but was coded incorrectly. The
program may still appear to work (mostly) if 5000-Exit is later in the
program than 1000-Start, the code between 1000-Exit and 5000-Exit
being executed inadvertantly. Depending on what this code is it may
not be noticed that it is being executed, the damage being only minor
- mostly.

> The only
> labels (and, if necessary GO TO's ) in the paragraph should be things
> like 1000-CONTINUE or 1000-GROUP-BYPASS.

The _only_ rational point of having labels between 1000-Start and the
end of 1000-Exit is to allow GO TOs. It is trivially easy to avoid
using GO TOs. Therefore it is trivially easy to eliminate the
spurious labels and just have a PERFORM without THRU.
 
> Remember, CLARITY is the MAJOR benefit for many coding techniques. You
> want to insure that anyone can read, understand, and modify your code
> when necessary.

Eliminating GO TOs, labels and THRU is a major component of improving
clarity and readability.

> Also, of prime importance, NEVER change styles in a program you are
> modifying, unless you are COMPLETELY rewriting the program. Mixing and
> mixing PERFORM_THRU and PERFORM's in the same program can give you more
> headaches than you ever want.
 
Absolutely.



Relevant Pages

  • Re: label printing
    ... Yes, you can modify the code to do that, but the entire approach to ... duplicated labels explained in that article is faulty. ... I have a question on modifying the functions in this reference, ... I have an Events module that pulls a group of accounts; ...
    (microsoft.public.access.reports)
  • Re: Programmatically Get/Set Shape properties (Label 1, 2, 3, 4)
    ... the display of name, use, ... a supplementary condition that can be modify by your program. ... The problem is that by default, the shapes I am using from ... What I would like to do is remove the content of any labels that the shape ...
    (microsoft.public.visio.developer)
  • Re: Is there a "visual" "editor" for Postscript files?
    ... I have a fairly simple line drawing with text labels from another program. ... The text size and placement is a problem. ... I have no need to modify the graphic content. ... would let you modify a Postcript file both visually and through code ...
    (comp.lang.postscript)
  • Re: Is there a "visual" "editor" for Postscript files?
    ... I have a fairly simple line drawing with text labels from another program. ... The text size and placement is a problem. ... I have no need to modify the graphic content. ... would let you modify a Postcript file both visually and through code ...
    (comp.lang.postscript)
  • Re: Is there a "visual" "editor" for Postscript files?
    ... I have a fairly simple line drawing with text labels from another program. ... The text size and placement is a problem. ... I have no need to modify the graphic content. ... would let you modify a Postcript file both visually and through code ...
    (comp.lang.postscript)