comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Looking for IDL code documentation standards
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Looking for IDL code documentation standards [message #44141 is a reply to message #44063] Tue, 17 May 2005 11:21 Go to previous messageGo to previous message
Michael Wallace is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Looking for IDL code documentation standards
Next Topic: fitting mixed gaussians

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Nov 30 06:08:04 PST 2025

Total time taken to generate the page: 1.60676 seconds