Re: best way to convert string array of floats to a float array

2012-07-24 Thread Jonathan M Davis
On Wednesday, July 25, 2012 06:18:13 Stephen Jones wrote: > Thanks Jonathan. Very cool language this: > > float[] dat; > dat~=array(map!(to!(float))(split(chompPrefix(s, "lno:"; > > The data is read from a string that contains floats, parsed by > the split into an array, converted into an arr

Re: best way to convert string array of floats to a float array

2012-07-24 Thread Stephen Jones
On Wednesday, 25 July 2012 at 03:23:52 UTC, Jonathan M Davis wrote: On Wednesday, July 25, 2012 04:06:57 Stephen Jones wrote: On Tuesday, 24 July 2012 at 02:05:18 UTC, Brad Anderson wrote: > On Tuesday, 24 July 2012 at 02:03:40 UTC, Stephen Jones > wrote: >> When it comes to reading float data

Re: best way to convert string array of floats to a float array

2012-07-24 Thread Jonathan M Davis
On Wednesday, July 25, 2012 04:06:57 Stephen Jones wrote: > On Tuesday, 24 July 2012 at 02:05:18 UTC, Brad Anderson wrote: > > On Tuesday, 24 July 2012 at 02:03:40 UTC, Stephen Jones wrote: > >> When it comes to reading float data from a text file into a > >> float array is there a better option th

Re: best way to convert string array of floats to a float array

2012-07-24 Thread Stephen Jones
On Tuesday, 24 July 2012 at 02:05:18 UTC, Brad Anderson wrote: On Tuesday, 24 July 2012 at 02:03:40 UTC, Stephen Jones wrote: When it comes to reading float data from a text file into a float array is there a better option than reading the data into a string array and then stepping though the a

Re: best way to convert string array of floats to a float array

2012-07-23 Thread Brad Anderson
On Tuesday, 24 July 2012 at 02:03:40 UTC, Stephen Jones wrote: When it comes to reading float data from a text file into a float array is there a better option than reading the data into a string array and then stepping though the array and converting the values into a float array: string[] t

best way to convert string array of floats to a float array

2012-07-23 Thread Stephen Jones
When it comes to reading float data from a text file into a float array is there a better option than reading the data into a string array and then stepping though the array and converting the values into a float array: string[] textData=read text data; float[] f; foreach(string s; textData){