December 22, 2014
On Saturday, 20 December 2014 at 08:09:06 UTC, Joel wrote:
> On Monday, 13 October 2014 at 16:06:42 UTC, Robert burner Schadek wrote:
>> On Saturday, 11 October 2014 at 22:38:20 UTC, Joel wrote:
>>> On Thursday, 11 September 2014 at 10:49:48 UTC, Robert burner Schadek wrote:
>>>> some self promo:
>>>>
>>>> http://code.dlang.org/packages/inifiled
>>>
>>> I would like an example?
>>
>> go to the link and scroll down a page
>
> How do you use it with current ini files ([label] key=name)?

I think I don't follow?

readINIFile(CONFIG_STRUCT, "filename.ini"); ?
December 23, 2014
On Monday, 22 December 2014 at 11:04:10 UTC, Robert burner Schadek wrote:
> On Saturday, 20 December 2014 at 08:09:06 UTC, Joel wrote:
>> On Monday, 13 October 2014 at 16:06:42 UTC, Robert burner Schadek wrote:
>>> On Saturday, 11 October 2014 at 22:38:20 UTC, Joel wrote:
>>>> On Thursday, 11 September 2014 at 10:49:48 UTC, Robert burner Schadek wrote:
>>>>> some self promo:
>>>>>
>>>>> http://code.dlang.org/packages/inifiled
>>>>
>>>> I would like an example?
>>>
>>> go to the link and scroll down a page
>>
>> How do you use it with current ini files ([label] key=name)?
>
> I think I don't follow?
>
> readINIFile(CONFIG_STRUCT, "filename.ini"); ?

I have a ini file that has price goods date etc for each item. I couldn't see how you could have (see below). It's got more than section, I don't know how to do that with your library.

In this form:

[section0]
day=1
month=8
year=2013
item=Fish'n'Chips
cost=3
shop=Take aways
comment=Don't know the date
[section1]
day=1
month=8
year=2013
item=almond individually wrapped chocolates (for Cecily), through-ties
cost=7
shop=Putaruru - Dairy (near Hotel 79)
comment=Don't know the date or time.

Also, what is CONFIG_STRUCT? - is that for using 'struct' instead of 'class'?
December 23, 2014
as you properly know, ini files don't support sections arrays.
If you know all items at compile time, you could create structs for all of them, but that is properly not what you're looking for.
1 2
Next ›   Last »