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

Home » Public Forums » archive » Re: Insert row in structure
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: Insert row in structure [message #14588] Fri, 12 March 1999 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Joe Means wrote:
>
> Howdy, I would like an effecient way to insert a row or observation in a
> structure. The structure is simple like:
> data = {data1,num:0L,x:0.0,y:0.0,z0.0}
> dataout = Replicate(data,100000L)
>
> I will have to insert, and at other times append, rows into dataout.
>
> thanks for any ideas,
> Joe
> --

Joe -

I surely might be missing something, but this problem looks like
it could be solved very effectively by using a linked list of
structures. This would make it very easy to insert or append
nodes, and you could "sort" your nodes by keeping an array of
pointers to the nodes, and just sort the pointers (instead of
the structures, which is inefficient).

Dave
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: device,decomposed=1 question
Next Topic: Changing default backgroud color of WIDGET_DROPLIST

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

Current Time: Wed Oct 08 13:49:39 PDT 2025

Total time taken to generate the page: 0.00456 seconds