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 
Switch to threaded view of this topic Create a new topic Submit Reply
Looking for IDL code documentation standards [message #44063] Mon, 16 May 2005 07:03 Go to next message
wcramer is currently offline  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 Go 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
Re: Looking for IDL code documentation standards [message #44145 is a reply to message #44063] Tue, 17 May 2005 08:53 Go to previous message
savoie is currently offline  savoie
Messages: 68
Registered: September 1996
Member
Ben Panter <me@privacy.net> writes:

> Antonio Santiago wrote:
>> Ken Mankoff wrote:
>
>>>
>>> I use this to generate pretty-print PS files. I think a2ps can also be
>>> used to generate HTML.
>>>
>>> a2ps --pre=idl --pro=color foo.pro
>>>
>>> There is also a pretty-print-buffer command in emacs.
>>>
>>> -k.
>>>
>> I use htmlize-buffer (http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el) with
>> color-themes.

I use ps-print-buffer-with-faces.

Matt


--
Matthew Savoie - Scientific Programmer
National Snow and Ice Data Center
(303) 735-0785 http://nsidc.org
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Sat Oct 11 03:53:09 PDT 2025

Total time taken to generate the page: 0.37042 seconds