April 20, 2009 Re: dmd 2.029 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | 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 where's fwritefln? Re: dmd 2.029 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | 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 Re: where's fwritefln? Re: dmd 2.029 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to annoyed | 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 Re: dmd 2.029 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | "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 Re: dmd 2.029 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | 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 Re: dmd 2.029 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter, how often do you update your working copy from the SVN? Obviously less than once every 2 releases. Stewart. |
April 21, 2009 Re: dmd 2.029 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | 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 Re: dmd 2.029 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | 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 Re: dmd 2.029 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | 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 Re: dmd 2.029 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | 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!
|
Copyright © 1999-2021 by the D Language Foundation