--- In [email protected], "swzoh" <[EMAIL PROTECTED]> wrote: > > --- In [email protected], "entropyreduction" <lists@> wrote: > Good! BTW, I sort of succeeded to create a region what I want. After > my previous post I just gave a go with instead > dll.create_struct("t t t t t",p1,p2,p3,p4,p5)
Yup, that'll work. You created a struct made up of a buchn of structs. > I don't know why but it worked. They definitely expect an array of > point structures. Is there a chance to confuse struct with array? An array is just a bunch of contiguous block of memory. So is a struct, expect the contiguous blocks can be of any type. Ergo, a struct made up of a bunch of the same types is an array. > > aVertices = dll.create_array(5,"struct*",aPoint1, aPoint2, aPoint3, > > aPoint4...) > > > > is inherently limited cause sooner lor later someone's gonna want an > > array with more than 22 elements. > > > > Though I suppose I could make that an option. > > > > Maybe need (or be useful to have) dll.set_struct_element too. > I suppose it'll be also useful in some cases. One assumes mostly structs get created with values for all members and they stay that way. But I suppose someone might change their minds. > > dll.set_array_element has somehow gota deal with pointers too. Hmm. > > > > aPoint = dll.create_struct(.....) > > ; allocates memory for pointers, not the pointed-to-structs > > aVertices = dll.create_array(5,"struct*",aPoint) > > ; service will have to be smart enough to notice that array is of > > type struct*, and therefore > > ; just update pointer in array > > dll.set_array_element(aVertices, 1, aPoint) > > I think I was careless then. I should've written struct, not struct*. > Apologies. Is there any frequently used API to need an array of t*? It happens. I thik there might be example in distributed sample script. Attention: PowerPro's Web site has moved: http://www.ppro.org Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/power-pro/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
