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

Home » Public Forums » archive » Re: Moving to objects loses array functionality?
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: Moving to objects loses array functionality? [message #63358 is a reply to message #63305] Tue, 04 November 2008 13:50 Go to previous message
Anonymous
Originally posted by: Demitri

Hi Paul,

On 2008-11-03 18:18:18 -0500, Paul van Delst <Paul.vanDelst@noaa.gov> said:

>
The IDL documentation specifically states the dereference operator
requires a scalar operand:
>
> <quote>
> Dereferencing Pointer Arrays
>
> Note that the dereference operator requires a scalar pointer operand.
> This means that if you are dealing with a pointer array, you must
> specify which element to dereference. For example, create a
> three-element pointer array, allocating a new heap variable for each
> element:
>
> ptarr = PTRARR(3, /ALLOCATE_HEAP)
>
> To initialize this array such that the heap variable pointed at by the
> first pointer contains the integer zero, the second the integer one,
> and the third the integer two, you would use the following statement:
>
> FOR I = 0,2 DO *ptarr[I] = I
> </quote>
>
>
> So it would appear the facile answer to your question is: no. The
> documentation itself suggests the use of for-loops.
>
> But, maybe some gun IDL guru out there may be able to conflate the
> histogram procedure and pointer dereferencing to do what you want?
> (I'd like to see that :o)
>
> cheers,
>
> paulv

Thanks for pointing that out - I missed that in the documentation. I
can completely understand how assigning the values would require a FOR
loop, but I was hoping that IDL could dynamically send the "message" to
the (dereferenced) structure to read the value. I'll assume that this
cannot be done until someone can prove me wrong!

Cheers,

Demitri
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Lions and tiger and objects, oh my!
Next Topic: Re: segment vector with missing data

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

Current Time: Sun Oct 12 00:01:41 PDT 2025

Total time taken to generate the page: 0.01073 seconds