/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

  1. class 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. create {ANY}
  10. make
  11. feature {ANY}
  12. make
  13. local
  14. string: STRING
  15. do
  16. string := call_c_prog
  17. io.put_string(string)
  18. io.put_new_line
  19. end
  20. call_c_prog: STRING
  21. external "C"
  22. alias "c_prog"
  23. end
  24. end -- class EXAMPLE