RETURN with a comment..........that is an excellent suggestion.

Nancy

----- Original Message ----- From: "Mark Johnson" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, September 27, 2005 2:51 PM
Subject: Re: [U2] Good Programming Practice Question.........


Another suggestion:

Since the RETURN statement actually has 2 meanings, I add a comment at the
end of the RETURN that concludes a called subroutine, especially if there
are internal subroutines within it.

RETURN ;* TO CALLING PROGRAM

I'm glad we don't have POP and wince when I see RETURN TO.

Mark Johnson
P.S. I would also love to see an analyzer program that identifies whether
OPENed files READ, WRITE, CLEAR and/or DELETE. It could be a comment at the
end of the OPEN statement. Often times I FIND a BP file for CUSTOMER and
WRITE but they're not necessarily attached.

OPEN "CUSTOMER" TO F.CUSTOMER ELSE STOP ;* RWCD

----- Original Message -----
From: "Keith W. Roberts" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, September 27, 2005 5:14 PM
Subject: RE: [U2] Good Programming Practice Question.........


I most heartily agree! Numbers in the labels don't elucidate; they merely
increase the length.  And I'm pretty sure I know that "U" comes somewhere
after "S". :)

My $0.02 (on issues ancillary to the code itself) ...

- make your BP files Type19 (DIR), so you can edit them outside of U2
using
whatever cotton-pickin' editor you like

- use source code control; absolutely anything is better than nothing, and
there are good free ones for all platforms

- agree on an indentation scheme and stick to it as a group, else
get/create
a beautifier which enforces the chosen standards before code checkin

-Keith

----Original Message----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill_H
Sent: Tuesday, September 27, 2005 1:35 PM
To: [email protected]
Subject: RE: [U2] Good Programming Practice Question.........

> Kevin:
>
> Not if you alphabetize the labels; then it works just like numeric.
> :-)
>
> Bill
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Kevin King
>> Sent: Tuesday, September 27, 2005 1:04 PM
>> To: [email protected]
>> Subject: RE: [U2] Good Programming Practice Question.........
>>
>> And here's where the conflict begins.  When looking through a
>> big program, I much prefer numeric labels in order with comments vs.
>> alphanumeric labels.  With numeric labels in order you find
>> 1800 and if you're looking for 2000 you know to look farther
>> down, 1000, go up.
>> With alpha labels if you find SELECT.FILE and are looking for
>> UPDATE.FILES, you have nothing but experience to know whether
>> to look up or down from there.
>>
>> Numeric labels are good.  Not ordering or commenting them is
>> bad.  And not putting comments around all labels to make them
>> more easily distinguished from the rest of the program is
>> near unforgiveable.
>>
>> -K
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Allen E.
>> Elwood Sent: Tuesday, September 27, 2005 12:40 PM
>> To: [email protected]
>> Subject: RE: [U2] Good Programming Practice Question.........
>>
>> My addition to this would be to use alphanumeric labels, and
>> to *have* a main calling section.  A main calling section
>> that looks like:
>>
>> GOSUB OPEN.AND.INIT
>> GOSUB SELECT.FILE
>> GOSUB PRE-PROCESS.VALIDITY.CHECKS
>> GOSUB PRINT.INVOICES
>> GOSUB UPDATE.FILES
>>
>> Looks so much better and is so easier to figure out than
>>
>> GOSUB 100
>> a bunch of statements
>> a bunch of statements
>> a bunch of statements
>> GOSUB 1250
>> a bunch of statements
>> a bunch of statements
>> a bunch of statements
>> GOSUB 1375
>> a bunch of statements
>> a bunch of statements
>> a bunch of statements
>> GOSUB 4000
>> a bunch of statements
>> a bunch of statements
>> a bunch of statements
>> GOSUB 9755
>> a bunch of statements
>> a bunch of statements
>> a bunch of statements
>>
>> IMNSHO - *=aee=*
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to