Re: crazy question [message #65374] |
Mon, 02 March 2009 13:55  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Vince Hradil writes:
> What about using EXECUTE, or CALL_METHOD, CALL_PROCEDURE, or
> CALL_FUNCTION? Isn't that what those are for?
It wouldn't work with CALL_METHOD, CALL_PROCEDURE,
or CALL_FUNCTION, since these only allow you to
specify the method, function, or procedure name
as a string. But I suppose you could get it to
work somehow with EXECUTE. I just usually rule
that out since I prefer my code be able to run
on the IDL Virtual Machine. (Only God knows why,
though, since I don't think anyone in the world
has actually run my code using the Virtual Machine!)
Cheers,
David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
Re: crazy question [message #65376 is a reply to message #65375] |
Mon, 02 March 2009 13:47   |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On Mar 2, 3:27 pm, David Fanning <n...@dfanning.com> wrote:
> llo writes:
>> There is a way to do that for a ROUTINES or FUNCTIONS that uses
>> KEYWORDS ?
>
> Alas, no. Whatever it is ITTVIS is doing, they are
> doing out of sight. :-)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
What about using EXECUTE, or CALL_METHOD, CALL_PROCEDURE, or
CALL_FUNCTION? Isn't that what those are for?
|
|
|
|
|
|
|
|
Re: crazy question [message #65469 is a reply to message #65378] |
Tue, 03 March 2009 01:04  |
Foldy Lajos
Messages: 268 Registered: October 2001
|
Senior Member |
|
|
On Mon, 2 Mar 2009, llo wrote:
> There is a way to do that for a ROUTINES or FUNCTIONS that uses
> KEYWORDS ?
You can do that with _EXTRA and CREATE_STRUCT:
; cut here, keytest.pro
pro keytest, key1=key1, key2=key2, _extra=ex
help, key1, key2
end
; cut here
IDL> keytest
% Compiled module: KEYTEST.
KEY1 UNDEFINED = <Undefined>
KEY2 UNDEFINED = <Undefined>
IDL> keytest, _extra=create_struct('key1', 1, 'key2', 2)
KEY1 INT = 1
KEY2 INT = 2
IDL>
regards,
lajos
|
|
|