how to print "111000" out into 0b111000

2022-01-19 Thread michaelbi via Digitalmars-d-learn
as captioned... thx.

Re: how to print "111000" out into 0b111000

2022-01-19 Thread Brian Callahan via Digitalmars-d-learn
On Wednesday, 19 January 2022 at 15:01:29 UTC, michaelbi wrote: as captioned... thx. ```d import std.stdio; import std.conv; void main() { writefln("0b%b", to!int("111000", 2)); } ```

Re: how to print "111000" out into 0b111000

2022-01-19 Thread MichaelBi via Digitalmars-d-learn
On Wednesday, 19 January 2022 at 15:41:31 UTC, Brian Callahan wrote: On Wednesday, 19 January 2022 at 15:01:29 UTC, michaelbi wrote: as captioned... thx. ```d import std.stdio; import std.conv; void main() { writefln("0b%b", to!int("111000", 2)); } ``` Got it, thanks