I am reading a data file that has a string of data (numbers separated by commas) like this 101,214,345,423,5,6,7
I have been parsing this string to fill an array of Ints and I was wondering if there was a way to do this:
Normally I would manually init an array with something like this IntArray = Array as Int(1, 2, 3, 4, 5)
Which is pretty much the same as what is inside my string.
This would really speed the code up if I did not have to parse the individual entries.
BobVal
I have been parsing this string to fill an array of Ints and I was wondering if there was a way to do this:
B4X:
Dim StringArray As String = "1,2,3,4,5,6,7,8,9" ' Read the string of data into a string
Dim IntArray() As Int
IntArray = Array As Int(StringArray) ' IS THERE ANY Way to tell the complier I want what is in the string not the string?
Normally I would manually init an array with something like this IntArray = Array as Int(1, 2, 3, 4, 5)
Which is pretty much the same as what is inside my string.
This would really speed the code up if I did not have to parse the individual entries.
BobVal