Files
c3c/resources/testproject/hello_world.c3
Christoffer Lerno 09d50ebf6c New import rules.
2022-06-04 01:41:23 +02:00

20 lines
342 B
C

module hello_world;
import std;
import bar;
$if (env::OS_TYPE == OsType.WIN32):
fn int test_doubler(int x)
{
return x * x;
}
$else:
extern fn int test_doubler(int);
$endif;
extern fn void printf(char *, ...);
fn int main()
{
printf("Hello World!\n");
bar::test();
printf("Hello double: %d\n", test_doubler(11));
return 17;
}