Re: Perfrom Thru
From: Richard (riplin_at_Azonic.co.nz)
Date: 03/16/04
- Next message: Richard: "Re: MySQL or PostGres data acess"
- Previous message: Howard Brazee: "Re: Perfrom Thru"
- In reply to: Pierra: "Re: Perfrom Thru"
- Next in thread: Chuck Stevens: "Re: Perfrom Thru"
- Reply: Chuck Stevens: "Re: Perfrom Thru"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Richard: "Re: MySQL or PostGres data acess"
- Previous message: Howard Brazee: "Re: Perfrom Thru"
- In reply to: Pierra: "Re: Perfrom Thru"
- Next in thread: Chuck Stevens: "Re: Perfrom Thru"
- Reply: Chuck Stevens: "Re: Perfrom Thru"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|