Creating Structs/Classes at runtime?
Brian Brady
brian.brady1982 at gmail.com
Mon Feb 18 02:55:27 PST 2013
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.
[...]
> Then you need something other than a CSV reader. Ordinarily,
> records in a CSV files have a known number of fields.
While you would assume the lines within a csv contain a specific
number of 'data points' surely the width of the csv is as
variable as the data within them? This is what I want to code
around.
[...]
> That is not a natural idiom for D and I don't think it is
> needed here. :)
That's ok. Like I said, I open to be pointed in a new, better
direction.
[...]
>
> What I see there is a label and a number of integers. Here is a
> simple parser that takes advantage of the %( and %) grouping
> format specifiers:
>
Aye, in this instance it is just that, but I was looking for a
more generalised code to account for, for example, when the first
2 are labels, or the first and third ...
Thanks everyone for the help.
Regards
Brian
More information about the Digitalmars-d-learn
mailing list