home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / lib_show / cecil / example3 / example.e < prev    next >
Encoding:
Text File  |  1999-06-05  |  582 b   |  32 lines

  1. class EXAMPLE
  2.    --
  3.    -- The Eiffel program is running first, then call the C program
  4.    -- which is in charge to print the contents of `values' using
  5.    -- `item' of ARRAY[INTEGER].
  6.    --
  7.    -- To compile this example, use command :
  8.    --
  9.    --         compile -cecil cecil.se example c_prog.c
  10.    --
  11.  
  12. creation make
  13.  
  14. feature
  15.  
  16.    make is
  17.       do
  18.          values := <<1,2,3>>;
  19.          call_c_prog(values);
  20.       end;
  21.  
  22. feature {NONE}
  23.  
  24.    values: ARRAY[INTEGER];
  25.  
  26.    call_c_prog(v: ARRAY[INTEGER]) is
  27.       external "C_WithoutCurrent"
  28.       alias "c_prog"
  29.       end;
  30.  
  31. end -- EXAMPLE
  32.