When running the following code, the out is unexpected:
Type myType( temp As Int, str As String)
Dim Info As myType
Dim myList As List
myList.Initialize
For i = 3 To 7
Info.temp = i
Info.str = "Value : " & i
myList.Add(Info)
Next
For i = 0 To myList.Size-1
Log (myList.Get(i))
Next
The temp value and the str 'i' value will be 7 for ALL entries in the list
The expected result is that the first list entry should have a value of 3, next 4 etc
If I add 'i' to the list it functions as expected
Any ideas?
Type myType( temp As Int, str As String)
Dim Info As myType
Dim myList As List
myList.Initialize
For i = 3 To 7
Info.temp = i
Info.str = "Value : " & i
myList.Add(Info)
Next
For i = 0 To myList.Size-1
Log (myList.Get(i))
Next
The temp value and the str 'i' value will be 7 for ALL entries in the list
The expected result is that the first list entry should have a value of 3, next 4 etc
If I add 'i' to the list it functions as expected
Any ideas?