We also use "xnn.meaningful.name" type labels. One advantage is that our
editor can recognise a label and putting the cursor on a line that
includes a GOSUB and pressing one function key will move the cursor
directly to the correct paragraph.
One thing I've never agreed with (except in COBOL) is "every internal
subroutine should only have on exit point" - why?
What is wrong with...
B00.PROCESS:
READ REC1 FROM file1,id1
ELSE RETURN
READ REC2 FROM file2,id2
ELSE RETURN
IF some.condition
THEN RETURN
some more statements
that actually do the work with REC1 & REC2
RETURN
The early RETURNs are just getting out of the routine on abnormal
conditions, the alternative would be to nest the code - but code nested
more than a couple of tabs deep is *much* harder to read.
AdrianW
DISCLAIMER:
Disclaimer. This e-mail is private and confidential. If you are not the
intended recipient, please advise us by return e-mail immediately, and delete
the e-mail and any attachments without using or disclosing the contents in any
way. The views expressed in this e-mail are those of the author, and do not
represent those of this company unless this is clearly indicated. You should
scan this e-mail and any attachments for viruses. This company accepts no
liability for any direct or indirect damage or loss resulting from the use of
any attachments to this e-mail.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/