Re: Easy way to format int in pragma msg ?

2020-05-14 Thread wjoe via Digitalmars-d-learn
On Thursday, 14 May 2020 at 10:58:34 UTC, WebFreak001 wrote: On Thursday, 14 May 2020 at 09:49:15 UTC, wjoe wrote: Is there an easy way to print an int in hexadecimal, octal or binary representation ? The documentation on pragma(msg, ...) and a quick web search didn't provide an answer.

Re: Easy way to format int in pragma msg ?

2020-05-14 Thread WebFreak001 via Digitalmars-d-learn
On Thursday, 14 May 2020 at 09:49:15 UTC, wjoe wrote: Is there an easy way to print an int in hexadecimal, octal or binary representation ? The documentation on pragma(msg, ...) and a quick web search didn't provide an answer. for simple hex/binary/etc printing use import std.conv;

Re: Easy way to format int in pragma msg ?

2020-05-14 Thread John Chapman via Digitalmars-d-learn
On Thursday, 14 May 2020 at 09:49:15 UTC, wjoe wrote: Is there an easy way to print an int in hexadecimal, octal or binary representation ? The documentation on pragma(msg, ...) and a quick web search didn't provide an answer. import std.string; pragma(msg, format("%x", 10)); %x = hex

Easy way to format int in pragma msg ?

2020-05-14 Thread wjoe via Digitalmars-d-learn
Is there an easy way to print an int in hexadecimal, octal or binary representation ? The documentation on pragma(msg, ...) and a quick web search didn't provide an answer.