Passing optional parameters through a wrapper routine [message #18840] |
Tue, 08 February 2000 00:00  |
bowman
Messages: 121 Registered: September 1991
|
Senior Member |
|
|
The _EXTRA keyword handles passing keyword parameters through a wrapper
routine, but what about optional parameters? If my wrapper for TVRD has
one of my own (mandatory) parameters, do I have to do the following?
PRO TVRD_WRAPPER, my_arg, x0, y0, nx, ny, channel, _EXTRA = tvrd_keywords
CASE N_PARAMS() OF
1 : image = TVRD( _EXTRA = tvrd_keywords)
2 : image = TVRD(x0, _EXTRA = tvrd_keywords)
3 : image = TVRD(x0, y0, _EXTRA = tvrd_keywords)
4 : image = TVRD(x0, y0, nx, _EXTRA = tvrd_keywords)
5 : image = TVRD(x0, y0, nx, _EXTRA = tvrd_keywords)
6 : image = TVRD(x0, y0, nx, ny, channel, _EXTRA = tvrd_keywords)
ELSE : MESSAGE, 'Incorrect number of arguments.'
ENDCASE
...
If I just try to pass undefined arguments through my wrapper, I get
'undefined variable' errors. (Is TVRD just counting the number of passed
parameters and not checking to see if they are defined?)
Ken
--
Dr. Kenneth P. Bowman, Professor 409-862-4060
Department of Meteorology 409-862-4466 fax
Texas A&M University bowmanATcsrp.tamu.edu
College Station, TX 77843-3150 Replace AT with @
|
|
|