Re: [Gambas-user] For Each Line in String

2013-08-17 Thread Fabien Bodard
Le 17 août 2013 17:55, "abbat81" a écrit : > > > Dim sPics as astring >dim sline as string > Shell "ls ~/Pictures/" to sPics > > For Each sLine in split(sPics"/n") > Print sLine > Next Ok > > > Fow can I do it? > Thanks > > > > -- > View this message in context: http://gambas.8142.n7.nabble.com/F

Re: [Gambas-user] For Each Line in String

2013-08-17 Thread Fabien Bodard
Le 17 août 2013 22:00, "Fabien Bodard" a écrit : > > > Le 17 août 2013 17:55, "abbat81" a écrit : > > > > > > Dim sPics as astring > >dim sline as string > > > Shell "ls ~/Pictures/" to sPics > > > > For Each sLine in split(sPics, "/n") > > Print sLine > > Next > > Ok > > > > > > > Fow can I do i

Re: [Gambas-user] For Each Line in String

2013-08-17 Thread paulwheeler
Not sure what you wanted to do with the information, but this code will get the directory info, output it to a file, print it to the console, and put it into an array. NOTE: This is an excerpt from the gambas-diskinfo (Version 1.0.33) code written by Demosthenes Koptsis. Sometimes i

Re: [Gambas-user] For Each Line in String

2013-08-17 Thread abbat81
It works if line if full but I need some part of line. Works: FOR EACH Sb IN Elt PRINT Sb NEXT I need: FOR EACH Sb IN Elt PRINT Left(Sb, 5) NEXT It gives me 5 chars of first line only. I should get every 5 chsrs of every line. -- View this message in context: http://gambas.8142.n7.

Re: [Gambas-user] For Each Line in String

2013-08-17 Thread Jussi Lahtinen
http://gambasdoc.org/help/lang/split Maybe by using gb.newline as separator. Jussi On Sat, Aug 17, 2013 at 6:54 PM, abbat81 wrote: > > Dim sPics as astring > > Shell "ls ~/Pictures/" to sPics > > For Each Line in sPics > Print Line > Next > > > Fow can I do it? > Thanks > > > > -- > View this

[Gambas-user] For Each Line in String

2013-08-17 Thread abbat81
Dim sPics as astring Shell "ls ~/Pictures/" to sPics For Each Line in sPics Print Line Next Fow can I do it? Thanks -- View this message in context: http://gambas.8142.n7.nabble.com/For-Each-Line-in-String-tp42889.html Sent from the gambas-user mailing list archive at Nabble.com.