as it says. i Aam ith our udt right now. First short clarification and do not skp the step if you are not satsfied with objects that are not able to appear in an array and are actualy no own kind of a typ but abused appearances of dynamic strings forced to swallow each other...
This
type foo
x as byte
Function _Create(L1 as Log, L2 As Long bt as Byte..)
' wil noot fire up for an array
End function
end type
Dim aaa() as foo
is correct not to go into _create()
because it does not create anything. if only defines aaa to be a dynamic array.
were the parameters 2 long variables and a byte = 9 byte and we pass 45 bytes it rould knoe where to to put it (only to _create
-not any other right now and if - it is what only udt -functions are capable of doig in type-functons. Not if unexpected the array member appears ( the function can not see its a group) but if 2 opening paretheses- mmediately - nothing inbetween those parendtheses but empty space
and three is a comma encountered within the inner paranthesis - elminates the chamce that it were a calculation using the parentheses to override the otder
you rermember variadic parameters -
As this
Dim aaa()
creates nothing yet i is not to consider.
Dim BBB(20) <
watch it's not redim but a stastic sized array (defined and allocated in one go)
and this will notfire zmr evento into create because of incorrect count of parameters that are passed
Dim ccc(5) As foo((1,2,3,4,5),( 2,2,2,2,3),(9,8,7,6,5))
it should accept the creation of 5 at once
condition all parameters correct and complete in count. Arrays cam be static or dynamic but must be fixed in size for each element.
But
ReDim abc(10)
is not possibe to lsunch _Create since thcreate happenned on Dim already where this array dpd not qualify becaue the reservation of a namde alone does not count as creation
Om;yx in case thr array y"forces" the creation of variable space andtries to drop conzrnt into a sroragw
dim A() as foo
is noz goimhg domrthig
fsi, B() as Foo(((1,2,3).(2,3,4),(0,0,0))
makes it 3, dynamic
tthe function must loook ahaead but it ould count for th E Euall AMOUNT OF PASSED PARAMETERS and shoulyf redim ( its the _create -function of that type ehdIt could do such thing for its members
And perhaps its not that complicated if is member of an arrax is except om DIMnot necessary
i dont know if it were easy to deteck if ftom the view of Me possible to detedtig data of me amd my array/s iblingd is a dpa (dynaimic pointer array} where
[code]
setat(Me, GetAt(me)+Sizeof(Me))
,mmakes ME to be the next in for each from to
thimkl a bit bout it. Sorry my eyesight is getting incredbly worse
Bookmarks