Looking for IDL code documentation standards [message #44063] |
Mon, 16 May 2005 07:03  |
wcramer
Messages: 9 Registered: February 2005
|
Junior Member |
|
|
Is there somewhere in the IDL guides or on the web that the IDL code
documentation standards are located? I've been able to piece together
some of it from IDL code examples, but I'd like to see a definitive
guide.
Thanks,
Doug
|
|
|
Re: Looking for IDL code documentation standards [message #44141 is a reply to message #44063] |
Tue, 17 May 2005 11:21  |
Michael Wallace
Messages: 409 Registered: December 2003
|
Senior Member |
|
|
>> 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.
Makes perfect sense. One of the rules that I didn't elaborate on was
that I prepend a short "namespace" to the front of my functions and
procedures. If I have a project called "Mike's Cool Project," the
typical routine name would look like something like mcp_function or
mcp_procedure. Any objects related to the project have the same
convention (e.g. MCPgrCoolTextThingy).
-Mike
|
|
|
|