Can I output strings using core.stdc.stdio?

Dave P. dave287091 at gmail.com
Tue Dec 22 21:40:15 UTC 2020


On Tuesday, 22 December 2020 at 21:37:23 UTC, Godnyx wrote:
> On Tuesday, 22 December 2020 at 21:28:10 UTC, Dave P. wrote:
>> On Tuesday, 22 December 2020 at 21:10:59 UTC, Godnyx wrote:
>> [...]
>
> Lol. Actually I just don't want to use Phobos and trying to 
> stay on core. Unfortunately, my variable can't be read at 
> compile time so I doesn't work. Any other ideas?

What I wrote should still work in non-betterC as long as you are 
linking to libc.

You can also just write to stdout directly if all you need is to 
write the string without any extra formatting:

fwrite(somestring.ptr, 1, somestring.length, stdout);




More information about the Digitalmars-d-learn mailing list