Re: Looking for IDL code documentation standards [message #44142 is a reply to message #44055] |
Tue, 17 May 2005 10:25   |
Timm Weitkamp
Messages: 66 Registered: August 2002
|
Member |
|
|
On 16.05.05 at 15:01 -0500, Michael Wallace wrote:
> Reserved Words - lowercase (e.g. begin, end, do, for, if, while)
>
> Variables: lowercase, words separated by "_" (e.g. my_var)
> Routines: lowercase, words separated by "_" (e.g. my_func)
> Keywords: UPPERCASE, words separated by "_" (e.g. MY_KEYWORD)
>
> Classes: MixedCase, no separation character (e.g. MyWonderfulClass)
> Methods: MixedCase, no separation character (e.g. GetProperty)
I find it useful to distinguish, in my code, names of routines that are
part of the IDL distribution from names of contributed routines. I do this
in the following way:
PRINT, SIN(MyFunc(x))
and apologize to all those who detest the all-uppercase way. What I
advocate is just only to make clear in *some* way that "sin" is part of
the IDL distribution, whereas "myfunc" isn't.
This helps avoid confusion and makes it easier to track down problems
caused by collisions in that small world called namespace.
Cheers,
Timm
--
Timm Weitkamp <http://people.web.psi.ch/weitkamp>
|
|
|