HP3000-L Archives

August 1999, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Nick Demos <[log in to unmask]>
Reply To:
Nick Demos <[log in to unmask]>
Date:
Tue, 31 Aug 1999 18:52:32 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (44 lines)
David Burney wrote:
>
<<  Preamble snipped>>

It was asked so i answer.

> - Is it better to use what I call "Fall-Down" or Fall-Thru logic ? i.e. No
>   main flow control, but what I like to call "The Pachinko Machine" effect.
Better to use "flow control".
>
> - Are explicit scope terminators (END-IF/END-CALL/END-PERFORM...)
>   better or more efficient than implicit scope terminators ?

Scope terminators are better.
>
> - When branching to perform a paragraph of instructions is it better to
>   use an exit paragraph and perform thru it ? i.e. PERFORM
>   PARAGRAPH-1 THRU PARAGRAPH-1-EXIT. Using the "EXIT"
>   statement.

Yes.


All the above lead to a more "readable" program, at no
discernible
performance penalty.

I might add that rules are made to be broken, as long as it does
not
become a habit.  Also following the rules does not itself lead to
a good program.  There is no substitute for simplicity and
conciseness.

MY $.02 worth.

Nick D.

P. S. IMHO the subprogram capability is much under used in COBOL.
Intelligently used it can lead to good modularity and faster
compiles
(only the changed sub program has to be recompiled).

NMD

ATOM RSS1 RSS2