Re: Contour data with two different lon/lat grids onto the same map projection [message #71223] |
Fri, 04 June 2010 10:07  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
mgalloy writes:
> I use main-level programs as a place to start or to place an example at
> the end of a file containing regular routines. Anything more complex
> than a few lines should be in a function/procedure. But the nice part is
> that it is easy to just add the "pro/function my_routine, a, b, etc.."
> line at the top of the main-level program to change it into a routine.
> After coding and getting something working, 99+% of what gets committed
> and kept is in regular routines.
I use main-level programs this way, too. But I see plenty
of people who use them (misuse them?) almost exclusively
and I think that is a big mistake, since it almost always
leads to unanticipated errors once you get more than about
10 lines of code in the darn things.
I certainly didn't mean to pick on you, but I'm almost
certain that if you can't run a program twice and get
the same result, it is programmer error in a main program. ;-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|