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

Home » Public Forums » archive » Re: An Callable IDL Question
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
Re: An Callable IDL Question [message #66303] Mon, 04 May 2009 00:52
hy.rs.whu is currently offline  hy.rs.whu
Messages: 2
Registered: May 2009
Junior Member
On 4月30日, 下午8时19分, "Haje Korth" <some...@somewhere.com> wrote:
> I do not use callable IDL, but one question occurred to me. Do you restore
> the sav file before invoking the function? Haje
>
> <hy.rs....@gmail.com> wrote in message
>
> news:4b635c0d-4d23-42b1-80af-7baec64e9b3a@z16g2000prd.google groups.com...
>
>> I wrote a c program in which I want to use Callable IDL to plot and
>> analysis some RS data.
>
>> First, I invoke IDL command in c program using function IDL_ExecuteStr
>> (). But it's hard to debug and I can't get any error information when
>> something wrong.
>
>> So I found out a solution. I wrote procedures and funcitons in IDL
>> IDE, so I can test and debug easily. When the code was tested good, I
>> save them as .sav file using SAVE command. If my solution works, I
>> could restore the function and invoking them in my c program.
>
>> But my solution faild. I couldn't invoke procedures and functions
>> in .sav file when I using Callable IDL.
>
>> I'm not sure whether my solution is right or wrong. So I ask your
>> help. Tell me the feasibility of my solution, please!
>
>

The answer is yes.

Following are my test IDL and C code segment:

IDL:

PRO fsplot, dimx, dimy
PLOT, dimx, dimy
END


C:

int main(int argc, char* argv[])
{
IDL_INIT_DATA init_data;

init_data.options = IDL_INIT_NOCMDLINE;
if (argc) {
init_data.options |= IDL_INIT_CLARGS;
init_data.clargs.argc = argc;
init_data.clargs.argv = argv;
}
if (IDL_Initialize(&init_data)) {

IDL_ExecuteStr("RESTORE, 'fsplot.sav'");
IDL_ExecuteStr("fsplot, [1,2,3], [1,2,3]");

IDL_Cleanup(FALSE); /* Don't return */
}

return 0;
}
Re: An Callable IDL Question [message #66352 is a reply to message #66303] Thu, 30 April 2009 05:19 Go to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
I do not use callable IDL, but one question occurred to me. Do you restore
the sav file before invoking the function? Haje


<hy.rs.whu@gmail.com> wrote in message
news:4b635c0d-4d23-42b1-80af-7baec64e9b3a@z16g2000prd.google groups.com...
> I wrote a c program in which I want to use Callable IDL to plot and
> analysis some RS data.
>
> First, I invoke IDL command in c program using function IDL_ExecuteStr
> (). But it's hard to debug and I can't get any error information when
> something wrong.
>
> So I found out a solution. I wrote procedures and funcitons in IDL
> IDE, so I can test and debug easily. When the code was tested good, I
> save them as .sav file using SAVE command. If my solution works, I
> could restore the function and invoking them in my c program.
>
> But my solution faild. I couldn't invoke procedures and functions
> in .sav file when I using Callable IDL.
>
> I'm not sure whether my solution is right or wrong. So I ask your
> help. Tell me the feasibility of my solution, please!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Extracting average pixel value
Next Topic: envi_output_to_external_format - jpeg output not working

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

Current Time: Fri Oct 10 15:12:12 PDT 2025

Total time taken to generate the page: 1.43700 seconds