April 20, 2009
Reply to Nick,

> "Andrei Alexandrescu" <SeeWebsiteForEmail@erdani.org> wrote in message
> news:gsiqdr$1csj$2@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.


April 20, 2009
It's in dmd-v2.026/src/phobos/std/stdio.d:void fwritefln(FILE* fp, ...)

but I cannot find it in 2.029.

April 20, 2009
annoyed Wrote:

> It's in dmd-v2.026/src/phobos/std/stdio.d:void fwritefln(FILE* fp, ...)
> 
> but I cannot find it in 2.029.
> 

It was removed, use File.writefln() instead. std.stdio has been rewritten so you might want to take a look at the docs.

Andrew
April 21, 2009
"BCS" <ao@pathlink.com> wrote in message news:78ccfa2d3e68b8cb8fe69f8b7fba@news.digitalmars.com...
> Reply to Nick,
>
>> "Andrei Alexandrescu" <SeeWebsiteForEmail@erdani.org> wrote in message news:gsiqdr$1csj$2@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?


April 21, 2009
Nick Sabalausky wrote:
> "BCS" <ao@pathlink.com> wrote in message news:78ccfa2d3e68b8cb8fe69f8b7fba@news.digitalmars.com...
>> Reply to Nick,
>>
>>> "Andrei Alexandrescu" <SeeWebsiteForEmail@erdani.org> wrote in message
>>> news:gsiqdr$1csj$2@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?
> 
> 

Since a few versions ago writef supports positional arguments with Posix syntax.

Andrei
April 21, 2009
Walter, how often do you update your working copy from the SVN? Obviously less than once every 2 releases.

Stewart.
April 21, 2009
Stewart Gordon wrote:
> Walter, how often do you update your working copy from the SVN? Obviously less than once every 2 releases.

As far as I know, it is current. Everything got checked in.
April 21, 2009
Hello Walter,

> Stewart Gordon wrote:
> 
>> Walter, how often do you update your working copy from the SVN?
>> Obviously less than once every 2 releases.
>> 
> As far as I know, it is current. Everything got checked in.
> 

I think he was asking about the otherway (not that I known why)


April 21, 2009
BCS wrote:
> I think he was asking about the otherway (not that I known why)

I think he'll need to be more specific!
April 21, 2009
Well, there's push (svn commit) and pull (svn up), so he must mean one or the other...

-[Unknown]


Walter Bright wrote:
> BCS wrote:
>> I think he was asking about the otherway (not that I known why)
> 
> I think he'll need to be more specific!