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

Home » Public Forums » archive » Error in concatenating structure arrays
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Error in concatenating structure arrays [message #8892] Wed, 30 April 1997 00:00
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Hello,

I have a niggling problem with structure concatenation.

The following code :

pro test

as_state = { x0:-1L, y0:-1L, x1:-1L, y1:-1L, select:-1L, color:-1L }
info = { as_state : as_state }
dummy = { x0:2L, y0:2L, x1:2L, y1:2L, select:2L, color:2L }
info = { as_state : [ info.as_state, dummy ] }
help, info.as_state

end

gives the result :

% Conflicting data structures: DUMMY,MISSING.
% Execution halted at: TEST 6 test.pro
% $MAIN$

i.e. when I try to concatenate the structures, it fails.

The following code defines the dummy structure differently:

pro test

as_state = { x0:-1L, y0:-1L, x1:-1L, y1:-1L, select:-1L, color:-1L }
info = { as_state : as_state }

dummy = info.as_state
dummy.x0 = 2L
dummy.y0 = 2L
dummy.x1 = 2L
dummy.y1 = 2L
dummy.select = 2L
dummy.color = 2L

info = { as_state : [ info.as_state, dummy ] }
help, info.as_state

end

and works as expected with the result:

<Expression> STRUCT = -> <Anonymous> Array(2)

My question is: Why does the first method, where the dummy structure to
be concatenated is explicitly defined, not work? What does the error
message actually mean?

Thanks for your time,

Paul van Delst
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Dynamically sized arrays
Next Topic: static variables

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

Current Time: Wed Oct 08 17:37:37 PDT 2025

Total time taken to generate the page: 0.00564 seconds