Re: How to know where IDL found the source of one procedure? [message #28273] |
Sat, 01 December 2001 12:06  |
kashyap
Messages: 26 Registered: April 1993
|
Junior Member |
|
|
at least in Solaris2.8/tcsh, you can make that a one-liner, thusly:
cauvery 105> find `echo $IDL_DIR/lib/ $IDL_PATH | sed 's/[+:]/ /g'` -name hist\*.pro -print
/soft/idl-asc/idl_5.1/idl/lib/hist_2d.pro
/soft/idl-asc/idl_5.1/idl/lib/hist_equal.pro
/soft/idl-asc/idl_5.1/idl/lib/obsolete/hist_equal_ct.pro
/soft/idl-asc/idl_5.1/idl/lib/obsolete/hist_equal_int.pro
(some systems append the standard IDL_PATH to preset IDL_PATH after idl
is invoked, hence the "$IDL_DIR/lib/ $IDL_PATH")
vinay
ps: good choice of machine name, btw.
In article <9u8o5g$na5$1@news.wrc.xerox.com>, Surendar Jeyadev <jeyadev@wrc.xerox.com> wrote:
>
> How about not using IDL?!
>
> How do I find all procedures that start with "hist"? This is how I will do
> it.
>
> kaveri 38% set aa = `echo $WAVE_PATH | sed 's/:/ /g' `
> kaveri 39% find $aa -name "hist*.pro" -print
> /import/pvwave-6.0/wave/lib/std/hist_equal.pro
> /import/pvwave-6.0/wave/lib/std/hist_equal_ct.pro
> /import/pvwave-6.0/wave/lib/user/hist_equal_int.pro
> /import/pvwave-6.0/wave/lib/user/guitools/demo/hist_plot_ini t.pro
> /import/pvwave-6.0/wave/lib/user/guitools/demo/histo_equal_i nit.pro
> /import/pvwave-6.0/wave/lib/std/hist_equal.pro
> /import/pvwave-6.0/wave/lib/std/hist_equal_ct.pro
> /import/pvwave-6.0/wave/lib/user/hist_equal_int.pro
> /import/pvwave-6.0/wave/lib/user/guitools/demo/hist_plot_ini t.pro
> /import/pvwave-6.0/wave/lib/user/guitools/demo/histo_equal_i nit.pro
> /import/pvwave-6.0/wave/lib/user/guitools/demo/hist_plot_ini t.pro
> /import/pvwave-6.0/wave/lib/user/guitools/demo/histo_equal_i nit.pro
>
> No doubt, there is an one-liner, but I am not an expert!
>
>> Lot's of easy things are hard in IDL. (A filled
>> contour plot comes to mind.) But this is balanced
>> by the myried hard things that are incredibly
>> easy. :-)
>
> You can say that again, dear sir!
> --
>
> Surendar Jeyadev jeyadev@wrc.xerox.com
--
____________________________________________________________ __________________
kashyap@head-cfa.harvard.edu 617 495 7173 [CfA/P-146] 617 496 7173 [F]
|
|
|
|
Re: How to know where IDL found the source of one procedure? [message #28306 is a reply to message #28277] |
Wed, 28 November 2001 21:07   |
Pavel A. Romashkin
Messages: 531 Registered: November 2000
|
Senior Member |
|
|
I know this is silly, but WHY would one need this? Isn't the whole idea of a
program in IDL path that you have a correct version and run it?
"Xiangyun Qiu" <qiuxiang@msu.edu> wrote in message
news:3C0568C1.DDEA79B1@msu.edu...
> Hi, all,
>
> Sorry for asking this question if it has been posted before, I tried to
> search this
> subject in the newsgroup, but failed.
>
> Let's suppose we put several identical "test.sav" files in different
> directories, all these
> directly are included in IDL searching path, but we have no idea about
> their order.
>
> If we fire up 'IDL', and execute "test", is there an easy way to know
> which 'test.sav' IDL
> first found and execute?
>
> Many thanks in advances,
>
> Xiangyun
>
|
|
|
|
Re: How to know where IDL found the source of one procedure? [message #28309 is a reply to message #28308] |
Wed, 28 November 2001 17:03   |
Xiangyun Qiu
Messages: 6 Registered: November 2001
|
Junior Member |
|
|
Craig Markwardt wrote:
> David Fanning <david@dfanning.com> writes:
>
>> Xiangyun Qiu (qiuxiang@msu.edu) writes:
>>
>>> Let's suppose we put several identical "test.sav" files in different
>>> directories, all these
>>> directly are included in IDL searching path, but we have no idea about
>>> their order.
>>>
>>> If we fire up 'IDL', and execute "test", is there an easy way to know
>>> which 'test.sav' IDL
>>> first found and execute?
>>
>> IDL> Help, /Source
>
> The ability for HELP to give the path to a SAVE file appears in IDL
> 5.3. Before that the source name appears blank.
>
> If you want to predict ahead of time which "test.sav" will be used,
> you should know they are searched in they order they appear in !PATH.
>
> Craig
>
> --
> ------------------------------------------------------------ --------------
> Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
> Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
> ------------------------------------------------------------ --------------
I also tried using help, /source_files ( this is my first time using
procedure <help> :-( )
it is more convenient, however the IDL documentation doesn't recommend
extracting
information as variables from the output. It's very handy for sure!
Thanks all,
Xiangyun
-
Attachment: qiuxiang.vcf
(Size: 0.22KB, Downloaded 141 times)
|
|
|
|
|
Re: How to know where IDL found the source of one procedure? [message #28312 is a reply to message #28311] |
Wed, 28 November 2001 15:50   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
David Fanning <david@dfanning.com> writes:
> Xiangyun Qiu (qiuxiang@msu.edu) writes:
>
>> Let's suppose we put several identical "test.sav" files in different
>> directories, all these
>> directly are included in IDL searching path, but we have no idea about
>> their order.
>>
>> If we fire up 'IDL', and execute "test", is there an easy way to know
>> which 'test.sav' IDL
>> first found and execute?
>
> IDL> Help, /Source
The ability for HELP to give the path to a SAVE file appears in IDL
5.3. Before that the source name appears blank.
If you want to predict ahead of time which "test.sav" will be used,
you should know they are searched in they order they appear in !PATH.
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
|
|
|