Re: Read csv data into a struct

2012-03-02 Thread Jesse Phillips
On Saturday, 3 March 2012 at 00:03:02 UTC, Yao Gomez wrote: On Friday, 2 March 2012 at 22:56:49 UTC, tjb wrote: Ali, Thanks. That helps me see how to use a structure. I just need to figure out the date and time conversion. Thanks! TJB I don't remember who did it or where is located, but

Re: Read csv data into a struct

2012-03-02 Thread Yao Gomez
On Friday, 2 March 2012 at 22:56:49 UTC, tjb wrote: Ali, Thanks. That helps me see how to use a structure. I just need to figure out the date and time conversion. Thanks! TJB I don't remember who did it or where is located, but there's actually a project/code that can be used for conver

Re: Read csv data into a struct

2012-03-02 Thread tjb
Ali, Thanks. That helps me see how to use a structure. I just need to figure out the date and time conversion. Thanks! TJB

Re: Read csv data into a struct

2012-03-02 Thread Ali Çehreli
On 03/02/2012 02:01 PM, Yao Gomez wrote: On Friday, 2 March 2012 at 21:50:12 UTC, tjb wrote: Woops. I have a mistake in the code. Should be: import std.stdio : writeln; import std.stream; void main() { auto fin = new File("temp.csv"); char[] line; int count; while(!fin.eof()) { line = fin.rea

Re: Read csv data into a struct

2012-03-02 Thread tjb
Yao, Thanks. That looks perfect. I'll play with it until I figure it out. Any suggestions for the date and time variables? Thanks again! TJB

Re: Read csv data into a struct

2012-03-02 Thread Yao Gomez
On Friday, 2 March 2012 at 21:50:12 UTC, tjb wrote: Woops. I have a mistake in the code. Should be: import std.stdio : writeln; import std.stream; void main() { auto fin = new File("temp.csv"); char[] line; int count; while(!fin.eof()) { line = fin.readLine(); writeln(line);

Re: Read csv data into a struct

2012-03-02 Thread tjb
Woops. I have a mistake in the code. Should be: import std.stdio : writeln; import std.stream; void main() { auto fin = new File("temp.csv"); char[] line; int count; while(!fin.eof()) { line = fin.readLine(); writeln(line); } } Thanks! TJB

Read csv data into a struct

2012-03-02 Thread tjb
Hello, I am trying to read some data from a csv file into a struct. I'm just learning to use D. This little bit of code reads the data and prints to standard output just fine: import std.stdio : writeln; import std.stream; void main() { auto fin = new File("temp.csv"); char[] line; in