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

Home » Public Forums » archive » Re: problems with call_function/procedure...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: problems with call_function/procedure... [message #7599] Wed, 04 December 1996 00:00
Robert Moss is currently offline  Robert Moss
Messages: 74
Registered: February 1996
Member
Hendrik Roepcke wrote:
>
> Hello,
>
> CALL_FUNCTION, CALL_PROCEDURE are nice functions, but
> due to the fact that the parameter-handling is strange,
> normally one has to use the overkill execute:
>
> b="/FLOAT"
> a=call_function('findgen',10,10,b,value=20)
>
> all this will show the problems with it...
>
> can anyone make it working WITHOUT execute?
>
> Hendrik
>
> --
> Panther in the Jungle __..--''``\--....___ _..,_
> -BELIEVE AND DECEIVE- _.-' .-/"; ` ``<._ ``-+'~=.
> http://www.ang-physik _.-' _..--.'_ \ `(^) )
> .uni-kiel.de/~hendrik ((..-' (< _ ;_..__ ; `'


This example doesn't show anything except the improper use of the
FINDGEN routine. FINDGEN has no keyword parameters, so when you try to
call it here with the /FLOAT and VALUE keywords, it fails. This has
nothing to do with CALL_FUNCTION.

However, if the point you are trying to get at is that you cannot pass
it a string like "/FLOAT" as per above, there is another way to do it:

b = 1
a = CALL_FUNCTION( "fltarr", 10, 10, NOZERO = b )

This will work just fine. Simply make use of the fact that
/KEYWORD is equivalent to KEYWORD = 1. Note that you can occassionaly
get into trouble, depending on how the code was written, if you are
trying to do KEYWORD = 0. (specifically, this may or may not be
equivalent to omitting the keyword).


--
Robert M. Moss, Ph.D. - mossrm@texaco.com - FAX (713)954-6911
------------------------------------------------------------ -----
This does not necessarily reflect the opinions of Texaco Inc.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Error signals / indices
Next Topic: price of pv~wave

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

Current Time: Wed Oct 08 15:13:27 PDT 2025

Total time taken to generate the page: 0.00527 seconds