dmd 2.029 release

Nick Sabalausky a at a.a
Mon Apr 20 17:47:59 PDT 2009


"BCS" <ao at pathlink.com> wrote in message 
news:78ccfa2d3e68b8cb8fe69f8b7fba at news.digitalmars.com...
> Reply to Nick,
>
>> "Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message
>> news:gsiqdr$1csj$2 at digitalmars.com...
>>
>>> BCS wrote:
>>>>
>>>> One option would be to not throw an error if the format string uses
>>>> indexing formats (e.i. out of order formatting)
>>>>
>>> Yah, that's an option I considered. Maybe it's the best way to go.
>>>
>> That would be far too clumbsy, unless you made it into two separate
>> functions.
>>
>> For instance (psuedocode):
>> auto userInput = getUserInput()
>> // userInput now contains "{Name} at {Address}", zip deliberately
>> ignored
>> writefln(userInput, name, address, zip); // They're used in-order, but
>> there
>> shouldn't be an error
>
> They are in order but are listed by name so the error doesn't throw. The 
> case where the error would be thrown is where the only format strings used 
> are the "get the next arg" kind.
>

I was just using names for illustrative purposes. Also, I was under the 
impression that printf-style "get the next arg" formatting codes were the 
only ones writef supported. Is this not so?




More information about the Digitalmars-d-announce mailing list