how to print "111000" out into 0b111000

MichaelBi shunjie.bi at gmail.com
Wed Jan 19 23:47:08 UTC 2022


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


More information about the Digitalmars-d-learn mailing list