G
Guest
I understand that writing programs with option strict on is the best way to
obtain stable applications. I have also found the applications to run much
faster.
Option strict on disallows late binding, so if I have an array with class
level scope and I am operating on that array at procedure level I fabricate a
"dummy array" and copy the class level array into it. Then after performing
the task I can copy the "dummy array" back into the global array. For example:
Dim A(10,10)
SUB
Dim localC(10,10) As Double
Dim earlybinda(10,10) As Double
Array.Copy(globalA, earlybinda, globalA.length)
For i = 1 To 10
For j = 1 To 10
localC(i, j) = Scalar * earlybinda(i, j)
Next
Next
Array.Copy(localC, globalA, (localC.length)
END
IS THIS THE BEST WAY TO AVOID LATE BINDING WHEN WORKING WITH ARRAYS?
obtain stable applications. I have also found the applications to run much
faster.
Option strict on disallows late binding, so if I have an array with class
level scope and I am operating on that array at procedure level I fabricate a
"dummy array" and copy the class level array into it. Then after performing
the task I can copy the "dummy array" back into the global array. For example:
Dim A(10,10)
SUB
Dim localC(10,10) As Double
Dim earlybinda(10,10) As Double
Array.Copy(globalA, earlybinda, globalA.length)
For i = 1 To 10
For j = 1 To 10
localC(i, j) = Scalar * earlybinda(i, j)
Next
Next
Array.Copy(localC, globalA, (localC.length)
END
IS THIS THE BEST WAY TO AVOID LATE BINDING WHEN WORKING WITH ARRAYS?