I believe standards are good !

I have been programming in Universe for 11 years.  I write in several
languages this would apply to most of the 2nd and 3rd generation
programming languages.  If you are training new programmers, please
train them on how to design before coding, adhere to shop standards, and
how to write structured code.  GOTOs and GOs should be avoided unless
there is no other way to handle the programming flow such as the open
file statement. I was taught to have the main logic after the open and
housekeeping sections, write short sections of code for one purpose,
create external subroutines if code will be or can be used in more than
one program.  If you follow this style you simply have to read the main
section of a program to determine how the program works.  This would
reduce the number of hours spent in maintenance as well.   An example is
below:







*  Main



   LOOP

    READNEXT CUST.ID ELSE EOF = 1

   UNTIL EOF EQ 1  DO        ;* use 'EQ' to determine values not '='

      GOSUB READ.CUST.INFO

      GOSUB GET.CUST.INV

      GOSUB CALC.INVOICE

      GOSUB PRINT.INVOICE



REPEAT

STOP     ;* STOP PROCESSING

*

GET.CUST.INFO:

* read the customer and get customer data for printing

   READ CUST.REC FROM CUSTOMER. CUST.NO THEN

**
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to