Public Sub Main() Dim s As String Dim i As String Dim a As New Integer[] ''1) with no knowledge of the number of values 'init the string s = "[12,32,3]"
'remove unused spaces and braquets For Each i In Split(Left(Right(Trim(s), -1), -1)) a.Add(i) Next 'display the array content For Each i In a Print i Next 2016-12-24 7:29 GMT+01:00 adamn...@gmail.com <adamn...@gmail.com>: > Baffled! > > I have a string, like "[1,3]", that I want to populate an integer array from. > > How to? > > tia > > -- > B Bruen <adamn...@gnail.com (sort of)> > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today.http://sdm.link/intel > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user