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

Home » Public Forums » archive » Re: wrapper functions
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: wrapper functions [message #50502 is a reply to message #50501] Thu, 05 October 2006 16:51 Go to previous messageGo to previous message
Dominic Metzger is currently offline  Dominic Metzger
Messages: 30
Registered: August 2006
Member
Hah, I see... is there a way that I wont have to define the positional
parameters since otherwise I will have to check again which ones were
passed in?

Example
READ_PICT, Filename, Image [, R, G, B]

so, here I would have to check if R was passed in, if G was passed in,
if B was passed in to see if I need to include them in the call inside
of the wrapper function.

best regards,

dometz




David Fanning wrote:
> Dometz writes:
>
>> So, I am trying to create wrapper functions with the use of _EXTRA,
>> _REF_EXTRA. I am not sure what I am doing wrong or if _REF_EXTRA can
>> only be used for named arguments.
>>
>> Why does the following give me the attached error?
>>
>> LOG_READ_JPEG, './testall/read_jpeg.jpeg', a
>>
>>
>> PRO LOG_READ_JPEG, _REF_EXTRA=e
>> COMPILE_OPT HIDDEN
>> print, "foobar"
>> READ_JPEG, _EXTRA=e
>> END
>>
>>
>> Error message:
>> READ_JPEG, _EXTRA=e
>> ^
>> % READ_JPEG: Incorrect number of arguments.
>
> The _EXTRA mechanism is called *keyword* inheritance,
> since only keyword parameters, not *positional* parameters
> can be collected and passed with this approach. You
> will have to define the positional parameters for READ_JPEG
> in your wrapper routine.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[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
Previous Topic: Re: executing a string in VM without using 'EXECUTE'
Next Topic: reading .mat files in IDL

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

Current Time: Wed Oct 08 18:11:52 PDT 2025

Total time taken to generate the page: 0.00410 seconds