D's Continous Changing
Bastiaan Veelo
Bastiaan at Veelo.net
Thu Mar 4 10:22:51 UTC 2021
On Wednesday, 3 March 2021 at 23:30:20 UTC, harakim wrote:
> Contrast to me trying to figure out how to format a number in
> binary. format!"%b"(number) does not work but is very similar
> to what is suggested in the documentation. I was able to figure
> out it's format("%b", number) but it took a few minutes.
This works for me:
rdmd --eval="writeln(format!`%b`(5));"
101
rdmd --eval="writeln(__VERSION__);"
2096
-- Bastiaan.
More information about the Digitalmars-d-learn
mailing list