On 5/16/07, Daniel Stenning <[EMAIL PROTECTED]> wrote: > > > > On 16/5/07 21:24, "Norman Palardy" <[EMAIL PROTECTED]> > wrote: > > > >> Using a memblock was my next thought but, alas, memblocks are not > >> allowed within structs: curious, why can't i store a 4-byte ptr to a > >> block of allocated memory in a struct as you can do in C? No dice. > > Have you considered creating a separate memblock to hold the array, then > assigning the memblock to a ptr variable and then holding this ptr in the > structure ?. You can store Ptr types in a structure, just not a memoryblock > reference. > Something like this: > > Dim myMBarray as New MemoryBlock( size * 4 ) > Dim MyArrayPtr as Ptr = myMBarray > > Dim myStruct As theStruct > MyStruct.MBarrayptr = MyArrayPtr
that would've been smart. I hadn't thought of it. thx. The class trick worked fine. P. -- ------------------------------------------------------------------------------- Peter K. Stys, MD Professor of Medicine(Neurology), Senior Scientist Ottawa Health Research Institute, Div. of Neuroscience Ottawa Hospital / University of Ottawa Ontario, CANADA tel: (613)761-5444 fax: (613)761-5330 http://www.ohri.ca/profiles/stys.asp ------------------------------------------------------------------------------- _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
