Android Question B4XPlusMinus: Passing a list of numbers to SetStringItems()

toby

Well-Known Member
Licensed User
Longtime User
I'm too lazy to wrap each number with " even though the function name indicates clearly that a list of strings is expected.
So far the following code hasn't caused any problem yet. To be on the safe side, I would like to have some confirmation whether or not it's okay to do so.

B4X:
    'a list of numbers with different gaps
    Dim lstNumbers As List=Array As Int(10, 20, 30, 40,50,60,70,80,90,100,150, 200, 250,300,350,400,450,500,550,600,650,700,750,800,850,900, 950,1000, 1100,1200, 1300,1400,1500, 1600,1700,1800,1900,2000,2500,3000,3500,4000,4500,5000,5500,6000,6500,7000,7500,8000,8500,9000,9500,10000,15000,20000,25000,30000,35000,40000,45000,50000,55000,60000,65000,70000,75000,80000)
    bpmNumbers.SetStringItems(lstNumbers)

TIA
 

Mahares

Expert
Licensed User
Longtime User
following code hasn't caused any problem yet. To be on the safe side, I would like to have some confirmation whether or not it's okay to do so.

Your code works very well Toby. If it makes you more at ease you can do this:
B4X:
Dim lstNumbers As List=Array As String(10, 20, 30, 40,50,6
and it still works. Don't freeze in that tundra
 
Upvote 0
Top