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

Home » Public Forums » archive » array of structures -- error Conflicting data 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: array of structures -- error Conflicting data structures [message #93827 is a reply to message #93826] Tue, 01 November 2016 06:21 Go to previous message
dcleuclidwl is currently offline  dcleuclidwl
Messages: 6
Registered: July 2016
Junior Member
You don't show us what is in your loop but I suspect you are trying to change a named structure, which is forbidden.

For example, if you create a structure and name it 'ksom'

create_struct,ca,'ksom',['DATA','XC','YC','DX','DY','TIME'], 'd(767,684),d(1),d(1),d(1),d(1),a(1)'
ksom=replicate(ca,6)

then you cannot later define a structure named 'ksom' with a different sized array.

IDL> create_struct,ca,'ksom',['DATA','XC','YC','DX','DY','TIME'], 'd(245,839),d(1),d(1),d(1),d(1),d(1)'
% Conflicting data structures: <DOUBLE Array[767, 884]>,KSOM.

I suspect you want to use an anonymous structure (use '' instead of 'ksom' ) though you could also use a different name each time the structure definition changes.

(Note that the procedure CREATE_STRUCT is not native to IDL
http://idlastro.gsfc.nasa.gov/ftp/pro/structure/create_struc t.pro
though the *function* CREATE_STRUCT() is. ) --Wayne



On Tuesday, November 1, 2016 at 6:31:02 AM UTC-4, sid wrote:
> Hi all,
> I need to create an array of structures,
> I have created structure like this, I have put this in a loop
>
> create_struct,ca,'ksom',['DATA','XC','YC','DX','DY','TIME'], 'd(767,684),d(1),d(1),d(1),d(1),a(1)'
>
> ksom=replicate(ca,6)
>
>
> im getting error like this,
> Conflicting data structures: KSOM,<STRUCT Array[1]>.
>
>
> can anyone let me know what is the problem here.
>
> thanks
[Message index]
 
Read Message
Read Message
Previous Topic: repeated use of TVRD() gives different results
Next Topic: a question on correct structure setting for EASE2 Grid in write_tiff

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

Current Time: Wed Oct 08 15:52:42 PDT 2025

Total time taken to generate the page: 0.00422 seconds