Code: Select all
Define d1.d
Dim MyArray.d(10)
d1 = 2.0
MyArray( d1 ) = 123.45
Code: Select all
Define d1.d
Dim MyArray.d(10)
d1 = 2.0
MyArray( Int(d1) ) = 123.45
My snippet is just to demonstrate the issue where my index is being passed in by a 3rd party app as a double. Thus I need to typecast it to an integer for the array.
Is there a more efficient way to typecast from double to integer for the array index?