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

Home » Public Forums » archive » Re: Q: Array of 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: Q: Array of Structures [message #12041 is a reply to message #12023] Sun, 14 June 1998 00:00 Go to previous messageGo to previous message
korpela is currently offline  korpela
Messages: 59
Registered: September 1993
Member
In article <MPG.feb2857db08f77a989681@news.frii.com>,
David Fanning <davidf@dfanning.com> wrote:
> But, look. I just tried this:
>
> a = { data:FltArr(10), name:'' }
> b = { data:FltArr(10), name:'' }
> c = [a, b]
> % Conflicting data structures: B,concatenation.
> % Execution halted at: $MAIN$
>
> But now, I try this:
>
> a = { data:FltArr(10), name:'' }
> b = a
> c = [a, b]
>
> No problem!

I think that the problems it that the first example creates anonymous
structures for each variable. Because the structures won't have the
same tag (anonymous structures are still tagged invisibly), they are
treated as different structure types. The problem goes away for tagged
structures. The following works just fine.

a = {StruTag, data:FltArr(10), name:'' }
b = {StruTag, data:FltArr(10), name:'' }
c = [a, b]

In the second example, the assignment gives b the same structure tag
as a, so the concatenation works just fine.

Personally, I'd like to see IDL check for identical anonymous structures
and set the structure tags appropriately.

Eric
--
Eric Korpela | An object at rest can never be
korpela@ssl.berkeley.edu | stopped.
<a href="http://sag-www.ssl.berkeley.edu/~korpela">Click for home page.</a>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: viewport events in widget_draw
Next Topic: From Bytes to Doubles, etc.

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

Current Time: Sat Oct 11 20:55:28 PDT 2025

Total time taken to generate the page: 1.28000 seconds