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

Home » Public Forums » archive » Structure Creation with Execute
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: Structure Creation with Execute [message #4029 is a reply to message #3992] Wed, 19 April 1995 00:00 Go to previous messageGo to previous message
Greening C M is currently offline  Greening C M
Messages: 5
Registered: April 1995
Junior Member
Hi,

If I understand correctly what you are trying to do you may be
able to nest structures within structures to create a sort of
linked list. If you need to make modifications to list (inserting,
or deleting items then it get a bit more complicated.

Chris
greec@essex.ac.uk

; place a new structure onto the front of the list
FUNCTION My_struct, x, r
RETURN, {, data:x, rest:r}
END

; test the list
PRO Test
list = 0

; set up the list to contain a set of different length arrays
FOR i = 1, 11 DO BEGIN
; create some junk data to store in the list
j = indgen(i)
; add the data to the list
list = my_struct(j, list)
ENDFOR

; print the contents of the list
tmp = list
FOR i = 0, 10 DO BEGIN
print, tmp.data
tmp = tmp.rest
ENDFOR
END
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Always Something to Worry About
Next Topic: Re: Always Something to Worry About

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

Current Time: Fri Oct 10 22:14:10 PDT 2025

Total time taken to generate the page: 0.96281 seconds