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

Home » Public Forums » archive » Re: call_method
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: call_method [message #26479 is a reply to message #26478] Thu, 06 September 2001 13:27 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Pavel A. Romashkin (pavel.romashkin@noaa.gov) writes:

> How does CALL_METHOD work? It would really be nice to be able to use the
> same routine as procedure or function, just as Call_method does,
> depending on what is happening in it. How did they do it?

I don't understand what you mean. If you are calling
a procedure method:

Call_Method, theMethod, theObject

If you are calling a function method:

result = Call_Method(theMethod, theObject)

You can't call a procedure method using the function
syntax, or visa versa.

IDL doesn't have any trouble keeping straight the difference
between procedures and functions with the same name:

PRO junk
Print, 'In procedure junk'
END

FUNCTION junk
Print, 'In function junk'
END

IDL> junk
In procedure junk
IDL> a=junk()
In function junk

Clearly, you can write your own routines to work exactly
like Call_Method.

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: structure information
Next Topic: Re: Problem combining structures

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

Current Time: Fri Oct 10 05:10:51 PDT 2025

Total time taken to generate the page: 0.80038 seconds