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 #50600 is a reply to message #50585] Sun, 08 October 2006 10:17 Go to previous messageGo to previous message
Dominic Metzger is currently offline  Dominic Metzger
Messages: 30
Registered: August 2006
Member
Hey Bob,

Thanks for the suggestion... I guess that would work... hmmm... and it
would also solve the problem of transparency... it is something to
consider.

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

Yes, the wrappers have to be in the users code, but I do this
automagically before the users code is run. In other words, I create a
copy of the users code with the wrapper functions in it.

thanks,

dometz


R.G. Stockwell wrote:
> "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 06:16:49 PDT 2025

Total time taken to generate the page: 0.47914 seconds