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

Home » Public Forums » archive » Re: Resizing array problem
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: Resizing array problem [message #49728 is a reply to message #49727] Thu, 10 August 2006 09:17 Go to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Thu, 10 Aug 2006, Tom S. wrote:

> Hi All,
>
> I'm having trouble resizing a byte array that's contained within a
> structure. Since I need the array to be larger, I can't use REFORM, and
> since it must become an arbitrary size I can't use REBIN, thus I'm
> trying to use CONGRID.
>
> In my code I have the statements,
>
> HELP, struct.data
> struct.data = CONGRID(struct.data, 512, 512)
>
> Running the program, I get this output in the console:
>
> <Expression> BYTE = Array[512, 300]
> Conflicting data structures: structure tag,<BYTE Array[512, 512]>.
>
> Anyone know how I can get around this?
>
> Thx!!
> Tom

Hi,

you can not change the size of an array inside a structure. I would use a
pointer in the structure:

s={s, p:ptr_new(bytarr(512,300))}
*s.p=congrid(*s.p, 512,512)

regards,
lajos
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: VM command line parameters
Next Topic: Interpolation from irregular to regular grid

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

Current Time: Tue Dec 02 12:20:00 PST 2025

Total time taken to generate the page: 1.12313 seconds