Re: PV-Wave/IDL Style Guide -- Does one exist? [message #13913 is a reply to message #13910] |
Thu, 31 December 1998 00:00   |
rmlongfield
Messages: 68 Registered: August 1998
|
Member |
|
|
In article <01be3403$59a9d080$490110ac@Shawn-pc.integ.com>,
"Shawn Scoles" <shawn@integ.com> wrote:
> Is there a web site which may have a style guide we could use to base our
> own style guide on? Or would someone be kind enough to E-Mail me
> (shawn@integ.com) a style guide they use? It would be of great help to us.
> Thank you.
>
> Signed,
> Shawn Scoles
> Integral Systems, Inc
> shawn@integ.com
Hi Shawn,
There are lots of Web pages with references to IDL which I have
been collecting over the past year from this newsgroup. They vary from
just a few programs to a complete IDL devoted web site. I list here two
of them which I visit frequently.
http://www.dfanning.com/index.html
http://fermi.jhuapl.edu/s1r/idl/idl.html
Just a short example of my experience with bad programming style,
I had to help someone at work who had started learning IDL from scratch
and had written a long program. I wanted to use a widget to simply call
this program and allow some input, the simplest kind of widget programming
one can think of. The first problem I encountered was that I could not
find the statement where I could add a keyword for input. It turns out
that it was somewhere in the middle of the program. There was no 'PRO
program_name' line! It wasn't REALLY necessary since the program was
working fine without it. (I think because IDL can run from the command
line which doesn't need a PRO line). However, for readability and adding
this keyword, we gave it a PRO statement.
I've been trying to use modular programming where separate
tasks are put in separate programs, each with a PRO or FUNCTION heading.
One advantage is that this often allows one to use programs which are
already written and available on the net. It also leads to easier to read
programs (well, sometimes...)
I also recommend getting a copy of David Fanning's book. It's not
only the only book around concerning IDL, it is a good book.
Good Luck!
Rose
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
|
|
|