Re: DCL Coding Standards
From: Charlie Hammond (hammond_at_not@peek.ssr.hp.com)
Date: 04/01/04
- Next message: Karl-Heinz Zimmer: "Re: IndeView sets your presentations free."
- Previous message: Andrew Harrison SUNUK Consultancy: "Re: AMD OpteronT Processor Powers New Family of Sun Fire Servers"
- In reply to: David M Smith: "Re: DCL Coding Standards"
- Next in thread: Charlie Hammond: "Re: DCL Coding Standards"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 01 Apr 2004 16:50:45 GMT
In article <i0am609hk3d9drcpropuh81mkll6j1jotm@4ax.com>,
David M Smith <dsmit115@csc.com> writes:
..
> o Keep comments in the body of the procedure to a minimum. ...
Somebody will take exception to almost anything. I think this particular
"standard" is poor.
You should expect/require enough comments to make what is being done
clear. The amount of comments depends on what the code is doing.
For example, the command
$ open kit$bld SYS$UPDATE:VMSKITBLD.DAT
is clear and obvious. No comment is required.
On the other hand, a line like
$ if f$cvui(96,16,kitbld_rec) .and. 4096 .eq. 4096 then ...
might require an entire page or explanatory comments.
(Yes, I do use code like this. This particular line is an only slightly
modified part of code which looks at the version of VMSKITBLD.IDX used for
OpenVMS Alpha _and_ OpenVMS I64 -- yes, the same KITBLD for both! --
to determine if a particular file is for Alpha-only, I64-only or both.)
If you are concerned that "too many" comments will slow down execution,
which can be an issue for large procedures or those with loops that
repeate many times, then I recommend the procedure DCL_DIET.COM from
the freeware. This procedure will remove comments and extra space
from a procedure. The result can run significantly faster. (Removing
comments can also hide information that you don't want a typical user
to be concerned about.)
DISCLOSURE: I am the author of DCL_DIET.COM.
If you want a copy and cannot find it on the freeware, email me.
--
Charlie Hammond -- Hewlett-Packard Company -- Ft Lauderdale FL USA
(hammond@not@peek.ssr.hp.com -- remove "@not" when replying)
All opinions expressed are my own and not necessarily my employer's.
- Next message: Karl-Heinz Zimmer: "Re: IndeView sets your presentations free."
- Previous message: Andrew Harrison SUNUK Consultancy: "Re: AMD OpteronT Processor Powers New Family of Sun Fire Servers"
- In reply to: David M Smith: "Re: DCL Coding Standards"
- Next in thread: Charlie Hammond: "Re: DCL Coding Standards"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|