Difference between revisions of "Externals"
m (7 revisions: initial import from SamrtEiffel Wiki - The Grand SmartEiffel Book) |
|||
Line 1: | Line 1: | ||
− | [[Category: |
+ | [[Category:Smarteiffel]] |
+ | |||
+ | See "External Types". |
||
''Externals'' build on top of a standard Eiffel mechanisn. This mechanisn permits calling code in a language different from Eiffel. |
''Externals'' build on top of a standard Eiffel mechanisn. This mechanisn permits calling code in a language different from Eiffel. |
Revision as of 22:10, 4 March 2013
See "External Types".
Externals build on top of a standard Eiffel mechanisn. This mechanisn permits calling code in a language different from Eiffel.
You will find below the current list of external specifications supported by SmartEiffel.
external "C"
This specification permits calling C code from Eiffel. This mechanisn is described in Eiffel: The Language.
Some examples are available in the tutorial, tutorial/external/C.
This mechanisn is only available with compile_to_c.
This mechanism has since been supplanted with plugins (see below).
external "C++"
This specification permits calling C++ code from Eiffel. This mechanism is described in Eiffel: The Language.
Some examples are available in the tutorial, tutorial/external/C++.
This mechanism is only available with compile_to_c.
This mechanism has since been supplanted with plugins (see below).
external "Java"
This specification permits calling Java code from Eiffel.
Some examples are available in the tutorial, tutorial/external/Java.
This mechanism is only available with compile_to_jvm.
This mechanism has since been supplanted with plugins (see below).
external "plug_in"
This specification is particularly utilized y the SmartEiffel standard libraries. This form is preferred to external "C" and external "Java".
Examples are available throughout the standard library.
A dedicated page is devoted to this functionality.
external "built_in"
This specification is reserved for the SmartEiffel compiler. It is not usable outside of very specific cases unique to compile_to_c and compile_to_jvm. These cases are the "building blocks" that produce specialized output code depending on the code generator being used.
For example, infix "#+" in the class INTEGER is directly translated in C by a +, and in Java by the iadd bytecode.
external types
A mechanism for embedding external types from the underlying language is being designed for the 2.4 release.