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

Home » Public Forums » archive » Re: call_procedure with a dynamically created arguments list?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: call_procedure with a dynamically created arguments list? [message #50601 is a reply to message #50600] Sat, 07 October 2006 14:41 Go to previous messageGo to previous message
news.qwest.net is currently offline  news.qwest.net
Messages: 137
Registered: September 2005
Senior Member
"Dometz" <dometz@gmail.com> wrote in message
news:1160175290.967818.184890@m73g2000cwd.googlegroups.com.. .
> Basically, all I am doing is:
> I automatically parse someones code and replace certain calls (ex:
> read_png) with wrapper functions. Inside of these wrapper functions, I
> record then timestamp when they were called, with what arguments etc.
> Now all this is supposed to happen transparent to the user. Basically,
> the user shouldnt even know that this happening or at least it shouldnt
> affect him.
>
> dometz


Well, the user is going to know, because the user will have to call the
wrapper.

The following is a horrible suggestion, I forbid you to do it. :)

but, why not just modify the actual function (if it is indeed read_png.pro
or any of the other functions with pro files). They are in the lib folder
of the IDL installation.
Just make sure that you take care when upgrading IDL versions.

I would make a CREATE_LOG_ENTRY procedure that does everything you want,
and paste it into each of the functions you wanted to wrap.

Inside of read_pict.pro
"PRO READ_PICT, filename, resultimage, r, g, b, DEBUG = DEBUG"

add a line like:
CREATE_LOG_ENTRY, 'Read_pict', filename, resultimage, r, g, b, debug


where your routine is something like

pro CREATE_LOG_ENTRY,
routinename,generic1,generic2,generic3,generic4,generic5,gen eric6,generic7,generic8
openw, lun,'logfile'
printf,lun, routinename
printf,lun, n_elements(generic1)
printf,lun, n_elements(generic2)
printf,lun, n_elements(generic3)
etc.



Cheers,
bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: wrapper functions
Next Topic: Re: border around draw widget

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

Current Time: Fri Oct 10 19:43:46 PDT 2025

Total time taken to generate the page: 0.24291 seconds