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

Home » Public Forums » archive » Re: Returning a struct containing variable-length arrays
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 a struct containing variable-length arrays [message #62536 is a reply to message #62528] Tue, 16 September 2008 06:37 Go to previous message
Mike[2] is currently offline  Mike[2]
Messages: 99
Registered: December 2005
Member
On Sep 15, 6:28 pm, franzpx125 <franzpx...@gmail.com> wrote:
> Hi!
>
> Within my DLM, I need to return a struct containing two arrays but the
> length of the arrays is known only at run-time. Which is the correct
> way to write the DLM code?

You can put a variable length array into a structure by putting a
pointer to the array in the structure:

result = { x: x, y: y, ptr: ptr_new()}
...
result.ptr = ptr_new(data)
return, result

I don't know if there are any DLM issues that will affect this, but it
works well for variable length arrays in objects and other structures.

Mike
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: My Last Day on the Job
Next Topic: Re: IDL Cursor and OS X 10.5.5

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

Current Time: Sun Oct 12 16:32:29 PDT 2025

Total time taken to generate the page: 0.00178 seconds