Board index » delphi » variant arrays of variant arrays
Greg Lorriman
![]() Delphi Developer |
Tue, 01 Jan 2002 03:00:00 GMT
variant arrays of variant arraysI can't set, directly, an element of a variant array of a variant array. I can do this : v:=varArrayof([varArrayOf([1,2]),varArrayOf([3,4])); Which creates a pseudo 2 dimensional variant array. But I can't then change one of the elements, without copying, as in this v[0][0]:=newVal; or v[0,0]:=newVal {which is for proper 2D arrays anyway} the compiler says that I can't assign to the left hand side. I've tried getting round this problem with these possible soloutions : variant(v[0])[0]:=newVal; or var pv : pvariant; or using absolute. I've also tried this : procedure setElement(const v : variant; element : integer;value : I've tried a lot more than this and gotten no where. Considering that the last of my examples appears to behave as though the a)there is a soloution Anyone have any ideas? |