N navicula Member Licensed User Longtime User Apr 27, 2016 #1 How to create Float Array from String list? example: item = "1.0" item = "3.4" item = "5.0" item = "7.2" I would like to get: Array As Float(1.0, 3.4, 5.0, 7.2) Thank you for your help.
How to create Float Array from String list? example: item = "1.0" item = "3.4" item = "5.0" item = "7.2" I would like to get: Array As Float(1.0, 3.4, 5.0, 7.2) Thank you for your help.
Erel B4X founder Staff member Licensed User Longtime User Apr 27, 2016 #2 B4X: Sub ListToFloats(l As List) As Float() Dim f(l.Size) As Float For i = 0 To l.Size - 1 f(i) = l.Get(i) Next Return f End Sub Upvote 0
B4X: Sub ListToFloats(l As List) As Float() Dim f(l.Size) As Float For i = 0 To l.Size - 1 f(i) = l.Get(i) Next Return f End Sub