Array of struct
David Vaughan
drvaughan55 at mac.com
Wed May 22 03:59:01 EDT 2002
On Tuesday, May 21, 2002, at 10:30 , Fabio Ivasse wrote:
> Firstly, how can I create a structure?
Fabio, do you mind my asking why you need this?
Some years ago I created a struct in HC, where each line of a container
held four items - a value, two pointers (line numbers) to the previous
and next item in the binary tree, and a pointer (a line number) into
another container which held text lines. I used this for cycles of an
evaluation then re-arrangement of the data using recursive routines.
Of course, when I moved this stack to Rev recently, I could now sort
numeric by item 1 (the current value) so the whole pseudo-structure of
linked lists and elegant recursive code were flicked in favour of
simplicity and ten times the speed.
You can emulate a struct by using items or lines in a container to hold
the data or pointers, and remembering how you are using it.
> And, how can I create an array of structures?
Stick instances of the above container into an array using any old index
that suits you.
Cheers
David
>
> TAL
> Fabio
>
> _________________________________________________________________
> Una-se ao maior serviço de email do mundo: o MSN Hotmail.
> http://www.hotmail.com
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list