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

Home » Public Forums » archive » Re: Passing more than one variable out of a function.
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 more than one variable out of a function. [message #65847 is a reply to message #65846] Wed, 25 March 2009 00:56 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Mar 25, 5:31 am, Ben <Benjamin.R.Ev...@gmail.com> wrote:

> The question is how can I write a user defined function which can pass
> more than one variable out to the calling program. Just like the WHERE
> function?
>
> I know that I could just use a procedure to do this. But I am just
> curious.

Just like a procedure actually.

function blah, in, out
out = 2*in
return, sqrt(in)
end

r = blah(4, out)

print, r, out
; prints: 2 8

Maarten
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Symsize doesn't seem to work?
Next Topic: Re: Help With Finding Local Maxima of an Image (locmax)

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

Current Time: Fri Oct 10 15:49:42 PDT 2025

Total time taken to generate the page: 1.04046 seconds