comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » listing all subroutines and paths used in a program.
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
listing all subroutines and paths used in a program. [message #74513] Mon, 24 January 2011 10:26 Go to next message
George Millward is currently offline  George Millward
Messages: 29
Registered: February 2000
Junior Member
Hi there,

I have been given a rather large idl program which I need to do some
development work on.
It calls all sorts of routines in all sorts of libraries. Some of the
routines are standard IDL commands
- some are locally part of the application - others are in libraries
that are located on networked drives.

I want to be able to get a meaningful listing of everything this
program calls. Is there a way to do this?
I realize that the console shows every subroutine/function as it is
first used/compiled - but what I need
is the full path to each routine - so I can stand some sort of chance
of figuring out where to find each routine.

Cheers

George.
Re: listing all subroutines and paths used in a program. [message #74561 is a reply to message #74513] Tue, 25 January 2011 12:45 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
David I still like that trick of that program, Of course I could do it
now with nicer lines and may be shorter but I think I would solve this
again in the same way.

Ever thought on using idl to idl something else?

cheers
Reimar
Re: listing all subroutines and paths used in a program. [message #74562 is a reply to message #74513] Tue, 25 January 2011 12:32 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Am 24.01.2011 19:26, schrieb George Millward:
> Hi there,
>
> I have been given a rather large idl program which I need to do some
> development work on.
> It calls all sorts of routines in all sorts of libraries. Some of the
> routines are standard IDL commands
> - some are locally part of the application - others are in libraries
> that are located on networked drives.
>
> I want to be able to get a meaningful listing of everything this
> program calls. Is there a way to do this?
> I realize that the console shows every subroutine/function as it is
> first used/compiled - but what I need
> is the full path to each routine - so I can stand some sort of chance
> of figuring out where to find each routine.

look at helpon of the icg library

http://www.fz-juelich.de/icg/icg-1/idl_icglib/idl_source/idl _html/dbase/helpon_dbase.pro.html

helpon, routine, /info

e.g. helpon, "js2string", /info
STR_SEP
/usr/local/itt/idl/idl80/lib/obsolete/str_sep.pro
2010-06-17 21:17:20
JS2STRING
/usr/local/icg/icg/idl_source/idl_work/aaa/js2string.pro
2010-02-18 10:04:20
STRING2JS
/usr/local/icg/icg/idl_source/idl_work/aaa/string2js.pro
2006-09-05 08:20:20
REPLACE_STRING
/usr/local/icg/icg/idl_source/idl_links/replace_string.pro
2004-06-21 13:44:00
GET_TEMPLATE_ONE_VALUE
/usr/local/icg/icg/idl_source/idl_links/get_template_one_val ue.pro
2003-03-20 10:09:40
IS_STRING
/usr/local/icg/icg/idl_source/idl_links/is_string.pro
2001-01-16 15:22:26
BUILD_VECTOR
/usr/local/icg/icg/idl_source/idl_links/build_vector.pro
2000-06-18 08:07:48
MONTH2NUMBER
/usr/local/icg/icg/idl_source/idl_links/month2number.pro
1999-12-14 14:56:40
CALL_HELP
/usr/local/icg/icg/idl_source/idl_links/call_help.pro
1999-11-06 16:44:28
IS_STRUCTURE
/usr/local/icg/icg/idl_source/idl_links/is_structure.pro
1998-09-07 14:21:11
WEEKDAY
/usr/local/icg/icg/idl_source/idl_links/weekday.pro
1998-06-16 13:33:02
YMD2JD
/usr/local/icg/icg/idl_source/idl_links/ymd2jd.pro
1998-01-16 09:26:26
MONTHNAMES
/usr/local/icg/icg/idl_source/idl_links/monthnames.pro
1998-01-16 09:26:10
JS2YMDS
/usr/local/icg/icg/idl_source/idl_links/js2ymds.pro
1998-01-16 09:26:06
JD2YMD
/usr/local/icg/icg/idl_source/idl_links/jd2ymd.pro
1998-01-16 09:26:06




cheers
Reinar

>
> Cheers
>
> George.
>
Re: listing all subroutines and paths used in a program. [message #74594 is a reply to message #74513] Mon, 24 January 2011 14:10 Go to previous message
George Millward is currently offline  George Millward
Messages: 29
Registered: February 2000
Junior Member
On Jan 24, 2:36 pm, Andrew Cool <andrew.c...@dsto.defence.gov.au>
wrote:
> On Jan 25, 7:06 am, Paulo Penteado <pp.pente...@gmail.com> wrote:
>
>
>
>> On Jan 24, 6:51 pm, George Millward <george.millw...@noaa.gov> wrote:
>
>>>> result = routine_info(my_app,/source)
>
>>> % ROUTINE_INFO: String expression required in this context: MY_APP.
>>> % Execution halted at: $MAIN$
>
>> What is the contents of the variable my_app? Apparently, not a string,
>> as routine_info expects.
>
>> Anyway, it seems that you are looking for all currently compiled
>> routines (after a call to your routine, or to resolve_all), which is
>> done without providing a routine name to routine_info. That is,
>> something like
>
>> result=routine_info(/source)
>
>> or
>
>> result=routine_info(/source,/functions)
>
> What's wrong with Help,/source ?
>
> It gives the full path name for all compiled procedures and functions.
>
> Andrewwww.skippysky.com.au

Hmm,

help,/source works great.

Thanks
Re: listing all subroutines and paths used in a program. [message #74596 is a reply to message #74513] Mon, 24 January 2011 13:36 Go to previous message
Andrew Cool is currently offline  Andrew Cool
Messages: 219
Registered: January 1996
Senior Member
On Jan 25, 7:06 am, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Jan 24, 6:51 pm, George Millward <george.millw...@noaa.gov> wrote:
>
>>> result = routine_info(my_app,/source)
>
>> % ROUTINE_INFO: String expression required in this context: MY_APP.
>> % Execution halted at: $MAIN$
>
> What is the contents of the variable my_app? Apparently, not a string,
> as routine_info expects.
>
> Anyway, it seems that you are looking for all currently compiled
> routines (after a call to your routine, or to resolve_all), which is
> done without providing a routine name to routine_info. That is,
> something like
>
> result=routine_info(/source)
>
> or
>
> result=routine_info(/source,/functions)


What's wrong with Help,/source ?

It gives the full path name for all compiled procedures and functions.


Andrew
www.skippysky.com.au
Re: listing all subroutines and paths used in a program. [message #74600 is a reply to message #74513] Mon, 24 January 2011 13:06 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Jan 24, 6:51 pm, George Millward <george.millw...@noaa.gov> wrote:
>> result = routine_info(my_app,/source)
>
> % ROUTINE_INFO: String expression required in this context: MY_APP.
> % Execution halted at: $MAIN$

What is the contents of the variable my_app? Apparently, not a string,
as routine_info expects.

Anyway, it seems that you are looking for all currently compiled
routines (after a call to your routine, or to resolve_all), which is
done without providing a routine name to routine_info. That is,
something like

result=routine_info(/source)

or

result=routine_info(/source,/functions)
Re: listing all subroutines and paths used in a program. [message #74601 is a reply to message #74513] Mon, 24 January 2011 13:04 Go to previous message
jeanh is currently offline  jeanh
Messages: 79
Registered: November 2009
Member
>> result = routine_info(my_app,/source)
>
> % ROUTINE_INFO: String expression required in this context: MY_APP.
> % Execution halted at: $MAIN$
>
> Any idea what I'm doing wrong ?

well, give it a string as it asks for!
result = routine_info('my_app',/source)

:-)

Jean
Re: listing all subroutines and paths used in a program. [message #74602 is a reply to message #74513] Mon, 24 January 2011 13:03 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
George Millward writes:

> But if I do this:
>
>> result = routine_info(my_app,/source)
>
> % ROUTINE_INFO: String expression required in this context: MY_APP.
> % Execution halted at: $MAIN$
>
> Any idea what I'm doing wrong ?

Have you compiled all the routines in your application?
Routine_Info only works on *compiled* program modules.
You will probably need to use RESOLVE_ALL to get everything
compiled, then try ROUTINE_INFO.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: listing all subroutines and paths used in a program. [message #74603 is a reply to message #74513] Mon, 24 January 2011 12:51 Go to previous message
George Millward is currently offline  George Millward
Messages: 29
Registered: February 2000
Junior Member
On Jan 24, 11:58 am, David Fanning <n...@dfanning.com> wrote:
> Paulo Penteado writes:
>> What about routine_info(/source)?
>
> Now there is a routine we should all be taking
> more advantage of!
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

routine_info should be what I need - but it's not working right.
If I do this:

> result = routine_info(my_app)
> print, result

I get all the called routines. Fine, but no paths - just the routine
names.

But if I do this:

> result = routine_info(my_app,/source)

% ROUTINE_INFO: String expression required in this context: MY_APP.
% Execution halted at: $MAIN$

Any idea what I'm doing wrong ?
Re: listing all subroutines and paths used in a program. [message #74607 is a reply to message #74513] Mon, 24 January 2011 10:58 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paulo Penteado writes:

> What about routine_info(/source)?

Now there is a routine we should all be taking
more advantage of!

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: listing all subroutines and paths used in a program. [message #74608 is a reply to message #74513] Mon, 24 January 2011 10:51 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
> I want to be able to get a meaningful listing of everything this
> program calls.  Is there a way to do this?
> I realize that the console shows every subroutine/function as it is
> first used/compiled - but what I need
> is the full path to each routine - so I can stand some sort of chance
> of figuring out where to find each routine.

What about routine_info(/source)?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: idl_help_path problem
Next Topic: Re: Need help with map projection conversion in ENVI

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:04:58 PDT 2025

Total time taken to generate the page: 0.36049 seconds