www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - std.format.format() ... ??!!

reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
Hello all,

I'm currently messing around in the internals of std.complex (cf. discussion on 
main mailing list:-).  In Complex.toString there is a deprecation message
asking 
the user to "use std.format.format()".

However, so far as I can tell both via docs and browsing std/format.d there
_is_ 
no std.format.format() -- there's only std.string.format().

So, what gives? :-)

Thanks & best wishes,

     -- Joe
Nov 27 2013
next sibling parent reply "evilrat" <evilrat666 gmail.com> writes:
On Wednesday, 27 November 2013 at 10:39:56 UTC, Joseph Rushton 
Wakeling wrote:
 Hello all,

 I'm currently messing around in the internals of std.complex 
 (cf. discussion on main mailing list:-).  In Complex.toString 
 there is a deprecation message asking the user to "use 
 std.format.format()".

 However, so far as I can tell both via docs and browsing 
 std/format.d there _is_ no std.format.format() -- there's only 
 std.string.format().

 So, what gives? :-)

 Thanks & best wishes,

     -- Joe
for string formatting use std.string.format, it is like writefln but for strings.
Nov 27 2013
parent Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On 27/11/13 12:17, evilrat wrote:
 for string formatting use std.string.format, it is like writefln but for
strings.
Which I normally do. :-) But in this case my question is slightly more specific ...
Nov 27 2013
prev sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Wed, Nov 27, 2013 at 05:07:29PM -0500, Jonathan M Davis wrote:
 On Wednesday, November 27, 2013 21:12:07 Joseph Rushton Wakeling wrote:
 On 27/11/13 18:55, Joseph Rushton Wakeling wrote:
 Understood. Pull request for the ddoc/deprecation message fix:
 https://github.com/D-Programming-Language/phobos/pull/1730
Thanks for the quick merge. std.complex.Imaginary to follow :-)
I don't know... Is it actually possible merge imaginary code? ;)
[...] Sure sounds like a complex task... :P On Wed, Nov 27, 2013 at 11:12:17PM +0100, Joseph Rushton Wakeling wrote:
 On 27/11/13 23:07, Jonathan M Davis wrote:
I don't know... Is it actually possible merge imaginary code? ;)
Yes, but the lines run up and down the screen ;-)
Rotate the code by 90° to get real code! But be careful which direction you rotate the code; it may end up doing the opposite of what it's intended to do. And I'm not sure github supports this kind of merging. But that's tangential to the issue! :P T -- The diminished 7th chord is the most flexible and fear-instilling chord. Use it often, use it unsparingly, to subdue your listeners into submission!
Nov 27 2013