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

Home » Public Forums » archive » Re: Singular arrays in structures...
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: Singular arrays in structures... [message #39905 is a reply to message #39903] Fri, 25 June 2004 08:49 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Tom McGlynn wrote:

> I'm sure that this probably has come up before, but I just haven't
> noticed it but every once in a while I run regression tests...
>
> In IDL 5.2 if one starts with
>
> x = {a:intarr(1),b:0}
> y = replicate(a,10)
>
> Then
>
> y.a = intarr(10) works
> y.a = intarr(1,10) fails
>
> In IDL 5.6 the results are reversed, the second method works
> while the first fails.
>
> Does anyone have any workarounds that will handle
> both cases or has this inconsistency perhaps been fixed
> in later versions of IDL? I'd prefer not to have to
> refer to the IDL version explicitly in the code.
>
> Thanks,
> Tom McGlynn

Dear Tom,

A workaround like this should help

sz=size(y.a,/dimensions)
y.a=reform(intarr(10),sz)

regards

Reimar

--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
[Message index]
 
Read Message
Read Message
Previous Topic: IDLWAVE 5.3 -- idlwave.org
Next Topic: 3d projection of a stack images

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

Current Time: Wed Oct 15 15:28:56 PDT 2025

Total time taken to generate the page: 3.03858 seconds