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

Home » Public Forums » archive » Re: Question about style
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: Question about style [message #12390] Thu, 30 July 1998 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Imanol Echave wrote:
>
> Hi people:
>
> In one of my programs I need to return some values, but every value is a matrix
> of diferent size and I can't make an array of matrix. The solution I've founded
> is to use an array of pointers pointing to the matrix. Do you think this is an
> ellegant way to do it? Has anyone a better idea?

This sounds perfectly reasonable to me; this is what pointers were
made for. I might suggest creating a structure containing the
pointers within your program, and then return that structure.
It's often easier to deal with data when it's encapsulated like
this. I often include a .status and .status_msg field so I can
return error codes and error messages within my structure.

Dave

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDLDE on MacOS edit speed?
Next Topic: Toggle buttons in pull down menu

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

Current Time: Fri Oct 10 05:31:17 PDT 2025

Total time taken to generate the page: 0.00194 seconds