Easy way to format int in pragma msg ?

John Chapman johnch_atms at hotmail.com
Thu May 14 10:00:31 UTC 2020


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
%o = octal
%b = binary


More information about the Digitalmars-d-learn mailing list