EbNoL Menu

Call C/C++ Functions

To call a C function from EbNoL call it just like you would an EbNoL function. The only difference is that we need to tell the compiler it is a C function. We do this by prefacing the function name with: c_.

            
// Create the main module for the program
Mod Main
  func Main(int argc, char array(0,0) argv) void

    c_printf("This is calling the c/cpp function printf")

  end Main
end Main
          

Insert C/C++ Code into Functions

To write C/C++ code directly into your program surround the C/C++ code with backticks: `printf("Test")`. C/Cpp code can only be added inside of functions. Variables and functions declared in other portions of the program can be referenced in C/C++ as EbNoL transpiles directly to C/C++.

            
// Create the main module for the program
Mod Main
  func Main(int argc, char array(0,0) argv) void

    `printf("This is calling the c/cpp function printf")`

  end Main
end Main