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

Home » Public Forums » archive » Re: Returning ARRAYs from functions?
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: Returning ARRAYs from functions? [message #29783] Wed, 13 March 2002 16:15 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"R.A" <roa@aber.ac.uk> writes:

> I have been rewriting some software in IDL5.4 passed onto me
> by a former colleague.
> Essentially the function is required to correct an array of values
> by applying a polynomial and then return the corrected array.
>
> I have noted this doesnt work as I have stated although I
> had the idea IDL could pass any dimension array to a
> function and return the array from the function.
>
> What seems to have been done is to create a structure from
> the array passed and return the structure.
>
> Is what I have said correct? ... that you need to pass data arrays
> from IDL functions as data structures as arrays cannot be
> passed??

Yes, arrays can be passed to and from IDL functions. You said it
"doesn't work" but that is not enough to really make a good diagnosis.

In addition to the other suggestions so far, I would offer another
possibility. There are some cases where an array can get truncated,
especially when multiplying quantities of different dimensions (as
might be the case with a polynomial multiplication). My suggestion is
to trace through your procedure and make sure the dimensions remain
what you think they should be.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: fun typos in IDL
Next Topic: Re: AVI reader/writer dll available

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

Current Time: Sat Oct 11 07:09:46 PDT 2025

Total time taken to generate the page: 0.15947 seconds