On Tuesday, 19 February 2013 at 01:09:06 UTC, Ali Çehreli wrote:
[...]
How about an OO solution?
That looks awesome. :)
I'll have a play with it and see if I can bend it to my will.
Thanks for the help.
Like I said, I'm a bit of a noob, so a push in a more suitable
direction is always apprec
On Monday, 18 February 2013 at 16:54:59 UTC, Ali Çehreli wrote:
[...]
You mean like this?
10,20,label,1,2,3,4
Then what are 10 and 20 on that line? Do they belong to the
previous label? If so, I think this format is too free-form to
be parsed by a general solution like csvReader. It looks li
On Monday, 18 February 2013 at 12:28:22 UTC, bearophile wrote:
[...]
Since some time I am maintaining most of the D code on
Rosettacode. What's broken in that program? "it doesn't work"
is too much vague.
Bye,
bearophile
Apologies. My wording was poor. I believe the RosettaCode code
worked
On Monday, 18 February 2013 at 05:26:39 UTC, Ali Çehreli wrote:
Thank you for the working solution.
[...]
Looking at the sample file you provide, what you call
"variables" look like data points.
Yes, apologies. Different languages using different terms to
describe, essentially the same thing.
On Monday, 18 February 2013 at 00:52:12 UTC, Adam D. Ruppe wrote:
[...]
---
auto text = "Name,Occupation,Salary\r"
"Joe,Carpenter,30\nFred,Blacksmith,40\r\n";
foreach(record; csvReader!(string[string])
(text, null))
{
writefln("%s works as a %s and earns $%s pe
Hi
Ok first ... is this possible? Or wise?
Being mostly self taught with regards to programming I sometimes
wonder if the way I'm going about something is even the right
approach, never mind whether my code is logical. So if this seems
ludicrous then please tell me my approach is silly and poi
Thanks for the replies.
Timons reply answers my question ... now I just have to figure out how :P
All
This might be relatively trivial so please point me at documentation to read
if it is.
I am creating an array of Structs(is this the best thing to do) as per the
example below.
#! /usr/bin/rdmd
import std.array;
import std.csv;
import std.stdio;
import std.string;
struct Data
{
string Dat
== Quote from Johannes Pfau (s...@example.com)'s article
> Brian Brady wrote:
> >All
> >
> >I am working through Andrei Alexandrescus "The D Programming Language"
> >but have hit a road block fairly early on.
> >
> >There is a program in the
All
I am working through Andrei Alexandrescus "The D Programming Language" but
have hit a road block fairly early on.
There is a program in the book which is designed to read through a text file
and do a simple word count. The program looks like this:
import std.stdio, std.string;
void main()
{
10 matches
Mail list logo