How to use ".stringof" to get the value of a variable and not the name of the variable (identifier) itself?

mw m at g.c
Mon Oct 9 16:53:55 UTC 2023


On Monday, 9 October 2023 at 16:51:31 UTC, rempas wrote:
> On Monday, 9 October 2023 at 16:42:38 UTC, mw wrote:
>> use:
>>
>> import std.conv;
>>
>> [...]
>
> Damn, sorry, forgot to mention. I cannot use Phobos.

but you `import std.stdio;`?

Or copy the std/conv.d over to your build,

or copy / write a toString(int) function yourself, which is 
compile-time callable.



More information about the Digitalmars-d-learn mailing list