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

Home » Public Forums » archive » 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 #50588 is a reply to message #50504] Mon, 09 October 2006 11:03 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Fri, 06 Oct 2006 14:06:41 -0700, Dometz wrote:

> Hey Ken,
>
> Yeah, I am still trying to find a solution that will allow my to write
> more or less completely transparent wrappers. Not quite there yet... or
> in other words havent figured out to what extend this is possible or
> not.

If you're simply passing through a known number of positional
parameters, you don't need to check anything:

pro wrapper, a,b,c,_REF_EXTRA=e
routine,a,b,c,_EXTRA=e
end

should do it. The a,b,c vars will either be defined if passed, or
undefined if they weren't used.

There is a nice story in the archives about whether you can tell the
difference between an undefined variable having been passed as a
positional argument, and no argument having been passed at all
(related to the sound of one hand clapping). The answer is yes, but
since no code actually does this (certainly no RSI code), this simple
wrapper method works fine.

A more complicated case arises when you want a dynamic number of
positional arguments, for example with call_procedure. Then you are
forced to build large switch statements, etc. Often you're better off
building your own _EXTRA structures by hand in this case.

JD

P.S. See http://www.dfanning.com/tips/keyword_check.html
[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
Previous Topic: .compile_opt strictarr is persistent?
Next Topic: Re: call_procedure with a dynamically created arguments list?

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

Current Time: Sat Oct 11 15:43:56 PDT 2025

Total time taken to generate the page: 1.44123 seconds