PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/tutorial/cecil/creation/example.e

http://github.com/tybor/Liberty
Specman e | 28 lines | 17 code | 4 blank | 7 comment | 0 complexity | 19042e5ee9fb5e707f413887d63af33f MD5 | raw file
 1class EXAMPLE
 2   --
 3   -- This example shows how to create Eiffel objects from C.
 4   --
 5   -- To compile this example, use command:
 6   --
 7   --  se c -cecil cecil.se example c_prog.c
 8   --
 9
10create {ANY}
11   make
12
13feature {ANY}
14   make
15      local
16         string: STRING
17      do
18         string := call_c_prog
19         io.put_string(string)
20         io.put_new_line
21      end
22
23   call_c_prog: STRING
24      external "C"
25      alias "c_prog"
26      end
27
28end -- class EXAMPLE