Re: Problem running functions [message #85903 is a reply to message #85902] |
Mon, 16 September 2013 14:28  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
liam.gumley@ssec.wisc.edu writes:
>
> This is how I manage my IDL path. Try it if you like.
>
> 1. Remove the path setting from all of your IDL .pro files (procedures and functions).
>
> 2. Assuming that you keep all your IDL .pro files in subdirectories under $HOME/idl, then create a file named idl_startup.pro in $HOME/idl containing this line
>
> !path = !path + ':' + expand_path('+$HOME/idl')
>
> 3. In your $HOME/.cshrc file, add this line (remove any existing IDL_STARTUP or IDL_PATH settings)
>
> setenv IDL_STARTUP $HOME/idl/idl_startup.pro
>
> 4. Log out and then log back in to cleanly execute the .cshrc file.
>
> That's it. You may also want to switch to the convention of using square brackets for referencing arrays, e.g.,
>
> b = a[0]
>
> instead of
>
> b = a(0).
>
> It makes life much easier.
>
> Cheers,
> Liam.
> Practical IDL Programming
> http://www.gumley.com/
>
> PS #1: You should also have a careful read of the sections titled "Managing IDL Paths" and "Automatic Compilation and Execution" in the IDL online help (type idlhelp).
>
> PS #2: You don't need to restart IDL every time you run a program.
My advice, exactly, although I would do this for all the reasons I've
listed previously. :-)
!PATH = Expand_Path('+$HOME/idl/:') + !PATH
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|