ni_nitdoc: added custom title, footer, overview and menu options
[nit.git] / tests / test_ffi_c_simple.nit
1 module test_ffi_c_simple
2
3 in "C header" `{
4 #include <stdio.h>
5 `}
6
7 in "C body" `{
8 int f( void ) {
9 printf( "in C!\n" );
10 return 42;
11 }
12 `}
13
14 class A
15 fun foo : Int in "C" `{
16 printf( "C implementation!\n" );
17 return f();
18 `}
19 end
20
21 fun bar : Float is extern `{
22 return 5.12345;
23 `}
24
25 print bar
26
27 var a = new A
28 print a.foo
29