Search code examples
importusingeiffel

"Using" or "import" clause in eiffel text


Is there a clause for including/using/import other classes, or maybe that's the Add Library part in EiffelStudio? If so, how would you do it in a text editor based environment?


Solution

  • In Eiffel there is no equivalent of the C/C++ "include". When you describe your project (in the ecf file) you indicate which clusters and libraries are part of your system. A cluster is basically a folder containing Eiffel classes. When you compile, the Eiffel compiler goes and scans all your clusters/libraries for .e files. You can use all and any of those classes without the need for any "include" directive.