Closed 9898287 closed 6 years ago
stdc is built into the D standard library, printf works fine.
D: dmd -o- main.d
void main(){
import core.stdc.stdio;
enum s=printf("hello\n");
}
Error: printf cannot be interpreted at compile time, because it has no available source code
/cc @9898287 happy to merge once you address that point
Ah, I see what you mean.
merged but fixed that comment i mentioned in https://github.com/timotheecour/D_vs_nim/commit/3ee5760c1f3011287fd7ac75b5489e014fc2bbd6 ; thanks!
thanks!
how so? IIRC can't use functions without source code in CTFE in D (such as printf etc)