G Graeme Mitchell Active Member Licensed User Oct 10, 2019 #1 If I want to build a list from an array that has 4 columns and 30 lines i tried the code below but it doesnt work Code: Dim data As List data.Initialize data.Add(LineArray) data.Add(CRLF)
If I want to build a list from an array that has 4 columns and 30 lines i tried the code below but it doesnt work Code: Dim data As List data.Initialize data.Add(LineArray) data.Add(CRLF)
William Lancee Well-Known Member Licensed User Longtime User Oct 10, 2019 #2 I started to reply, but realized I don't know enough of what you wanted to do. What do you want the end result to be? A List so that it can saved with File.WriteList? What do you want each line in the output to look like? How is LineArray dimensioned, and what type of object (Int, String..) Upvote 0
I started to reply, but realized I don't know enough of what you wanted to do. What do you want the end result to be? A List so that it can saved with File.WriteList? What do you want each line in the output to look like? How is LineArray dimensioned, and what type of object (Int, String..)
G Graeme Mitchell Active Member Licensed User Oct 10, 2019 #3 I want to take the list and add it to a B4XTable Upvote 0
William Lancee Well-Known Member Licensed User Longtime User Oct 11, 2019 #4 Great. Code: 'You don't need CRLF Dim LineArray(30,4) As Int 'or Float or String or ... Dim data As List data.Initialize For i = 0 To 29 data.Add(Array(LineArray(i,0), LineArray(i,1), LineArray(i,2), LineArray(i,3))) Next B4XTable1.SetData(data) Last edited: Oct 11, 2019 Upvote 0
Great. Code: 'You don't need CRLF Dim LineArray(30,4) As Int 'or Float or String or ... Dim data As List data.Initialize For i = 0 To 29 data.Add(Array(LineArray(i,0), LineArray(i,1), LineArray(i,2), LineArray(i,3))) Next B4XTable1.SetData(data)
G Graeme Mitchell Active Member Licensed User Oct 11, 2019 #5 Thank you, that worked perfectly Upvote 0