CIR Playground
Load example...
CIR on GitHub
Input
Run
// On the other hand, with CIR, all identifiers in functions are bound at the // parsing stage before the function is even run at compile time. // Thus, the puts() in sayHello() here is bound to the puts() in global scope. // The output from CIR is thus correct. #include <cir.h> #include <cirq.h> int puts(const char *); static CirCodeId sayHello(void) { // puts() here is bound to the puts() in global scope. return @CirQ(puts("Hello World!")); } int main(void) { int puts = 0; // puts is shadowed here, but it doesn't affect sayHello() @sayHello(); return 0; }
stdout
stderr
Load Example...
×
00 - Compile-time fibonacci
01 - Inline Repeat
02 - Compile-time strtok
03 - Does a code call a function
04 - C Preprocessor identifiers may be accidentally shadowed
05 - CIR identifiers won't be accidentally shadowed
06 - C Preprocessor accidental capture of symbols
07 - CIR won't accidentally capture symbols
08 - bf-to-C (low level ver)
09 - bf-to-C (with quote-antiquote)
10 - async-await
11 - Embed an external file
12 - zlib