I'm back.
I can access an array by indexes, by rows, and by element names.
But in the process of demoing how great it is, I hit a problem.
In the following, I commented out the problem statements.
I think the arrays in the UDT should be able to be loaded the same as non-UDT arrays?
This is really low priority. I just came across it by accident.
Uses "console"
Type typem22
m(2,2) As Single
End Type
Type typev1to4
v1 As Single
v2 As Single
v3 As Single
v4 As Single
End Type
Global m22A(2,2) As Single
Global v1to4A As typev1to4 At VarPtr(m22A(1,1))
Global m22B As typem22
Global v1to4B As typev1to4 At VarPtr(m22B.m(1,1))
Global sJoined As String
m22A = 11,12, 21,22 ' column order
m22A(1,1) = 11,12, 21,22 ' column order
sJoined = v1to4A.v1 & v1to4A.v2 & v1to4A.v3 & v1to4A.v4
PrintL sJoined, IIf$(sJoined = "11122122", "OK (column)", "PROBLEM")
m22A = [11,12, 21,22] ' row order
m22A(1,1) = [11,12, 21,22] ' row order
sJoined = v1to4A.v1 & v1to4A.v2 & v1to4A.v3 & v1to4A.v4
PrintL sJoined, IIf$(sJoined = "11211222", "OK (row)", "PROBLEM")
'm22B.m = 11,12, 21,22 ' column order ' problem with this usage
m22B.m(1,1) = 11,12, 21,22 ' column order
sJoined = v1to4B.v1 & v1to4B.v2 & v1to4B.v3 & v1to4B.v4
PrintL sJoined, IIf$(sJoined = "11122122", "OK (column)", "PROBLEM")
'm22B.m = [11,12, 21,22] ' row order ' can't get loaded in row order
'm22B.m(1,1) = [11,12, 21,22] ' row order ' can't get loaded in row order
Console_WaitKey