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

Home » Public Forums » archive » Re: Passing optional parameters through a wrapper routine
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: Passing optional parameters through a wrapper routine [message #18829] Wed, 09 February 2000 00:00 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Kenneth P. Bowman <bowman@null.tamu.edu> wrote in message
news:bowman-0802002243470001@tl6-218-199.tca.net...
> In article <MPG.130a910d141f1260989a21@news.frii.com>, davidf@dfanning.com
> (David Fanning) wrote:
>
>> Having said that, it absolutely behooves you to check
>> each and every variable you plan to use in your program
>> to make sure you have a defined variable at the time
>> you use it. This is normally done with the N_Elements
>> function, since this function returns a 0 if its argument
>> is undefined.

Responding to the excerpt from David's message (which I haven't seen in full
yet)..

I don't see anything generally wrong with passing variables on without
knowing what they are or whether they are defined. That's what a wrapper
routine does -- it concerns itself with some subset of the information
passed to it and let's the "wrappee" deal with the rest. RSI in their wisdom
invented inheritance mechanisms to do this with keywords. For a general
wrapper routine with an unknown number of positional parameters I favour the
"case n_params()" syntax originally proposed by Kenneth. If I get a chance
tomorrow I may illustrate this using my (almost completely) general wrapper
routines that report on the execution time of the wrappee.

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Object recognition
Next Topic: call C routine on a Linux computer

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

Current Time: Wed Oct 08 19:13:44 PDT 2025

Total time taken to generate the page: 0.00444 seconds