Can I output strings using core.stdc.stdio?
Godnyx
rempas at tutanota.com
Wed Dec 23 19:04:23 UTC 2020
On Wednesday, 23 December 2020 at 13:55:20 UTC, Adam D. Ruppe
wrote:
> On Wednesday, 23 December 2020 at 13:06:37 UTC, drug wrote:
>> static foreach (ulong i; 0..args.length) {
>> static if (is(typeof(args[i]) == string))
>> printf("%s\n", args[i].toStringz);
>> static if (is(typeof(args[i]) == int))
>
> Putting some `else` in there would help too to ensure your
> thing only ever matches one branch.
>
> doesn't matter here but will later if you add generic array
> support.
>
> and then there's const etc but that's yet another thing so wait
> on that till you have the basics down
I will probably but I probably won't add array, class support.
Probably I'll use this only for debug purposes with std.write.
Thanks a lot for everything!!!
More information about the Digitalmars-d-learn
mailing list