Re: BigInt to binary

2015-04-26 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 25 April 2015 at 21:13:29 UTC, Ali Çehreli wrote: On 04/25/2015 01:23 PM, Dennis Ritchie wrote: which section should apply similar requests? https://issues.dlang.org/ After clicking "File and Issue": Component: Phobos Severity: Enhancement Ali Thanks. I reported this: - ht

Re: BigInt to binary

2015-04-25 Thread Ali Çehreli via Digitalmars-d-learn
On 04/25/2015 01:23 PM, Dennis Ritchie wrote: which section should apply similar requests? https://issues.dlang.org/ After clicking "File and Issue": Component: Phobos Severity: Enhancement Ali

Re: BigInt to binary

2015-04-25 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 25 April 2015 at 18:58:50 UTC, Marc Schütz wrote: BigInt only supports %d, %x, %X and %s: http://dlang.org/phobos/std_bigint.html#.BigInt.toString The missing %o and %b were probably an oversight, feel free to file an enhancement request or submit a PR. All right. I will file a r

Re: BigInt to binary

2015-04-25 Thread via Digitalmars-d-learn
On Saturday, 25 April 2015 at 13:13:10 UTC, Dennis Ritchie wrote: Hi, Is there a way to apply a function "format" with BigInt? - import std.stdio, std.bigint, std.string; void main() { BigInt n = -10; string s = format("%b", n); // error writeln(s); } BigInt onl

BigInt to binary

2015-04-25 Thread Dennis Ritchie via Digitalmars-d-learn
Hi, Is there a way to apply a function "format" with BigInt? - import std.stdio, std.bigint, std.string; void main() { BigInt n = -10; string s = format("%b", n); // error writeln(s); }