[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiple values from a function?
- Subject: Re: Multiple values from a function?
- From: Simon de Vet <simon(at)mathstat.dal.ca>
- Date: Wed, 05 Jul 2000 08:24:06 -0300
- Newsgroups: comp.lang.idl-pvwave
- Organization: ISINet, Nova Scotia
- References: <3961EFA8.49657FB6@mathstat.dal.ca>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:20119
Simon de Vet wrote:
> It also produces a number of other arrays which I'd like to have access
> to. Unfortunately, I have discovered that a function can only return
> one value.
I have managed to solve my problem, but in a way unlike anything mentioned
here so far.
In the end, I managed to figure out how structures work. I put all the
arrays and variables into one structure at the end of my function, and
passed this to the main program. Here, I was able to take it apart again,
and get all the original arrays and variables back.
I don't know if this is a better or worse method than those mentioned, but
it works so I'll keep using it for now.
Simon