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

Imperatorn johan_forsberg_86 at hotmail.com
Tue Oct 17 14:44:29 UTC 2023


On Tuesday, 17 October 2023 at 13:31:39 UTC, Salih Dincer wrote:
> On Sunday, 15 October 2023 at 07:22:53 UTC, Imperatorn wrote:
>>
>> You already got a lot of good answers, I thought I'd just 
>> share this for anyone searching for nogc string formatting 
>> compatible with betterC:
>>
>> https://code.dlang.org/packages/bc-string
>
> Doesn't it make more sense to use [ParseResult!T 
> parse(T)(cstring 
> str)](https://github.com/tchaloupka/bc-string/blob/master/source/bc/string/conv.d) instead of nested if's here:
> https://github.com/tchaloupka/bc-string/blob/master/source/bc/string/numeric.d
>
> Thanks,
>
> SDB at 79

Omg, yeah, that looks like some kind of hack. Make a PR :)


More information about the Digitalmars-d-learn mailing list