To complete this study of the compilation process let's see a few more properties of how you can execute an Eiffel system, both in EiffelStudio and as a compiled system that you deliver to its users, who may need to run it without EiffelStudio.
Our example system is very simple and has no need for execution arguments. In more advanced cases you may want to pass values to the execution, such as a numeric parameter or a file name, so that you can have different executions without changing and recompiling the software.
In the Eiffel text, you can access such run-time arguments through the Kernel Library class ARGUMENTS . There is another technique -- using the arguments to the root creation procedure -- but using ARGUMENTS is the most general way. Any class of your system can inherit from ARGUMENTS and use queries argument_count to know the number of arguments passed to the execution, and argument ( i ) , for i between 1 and argument_count to access the i -th element. Class ARGUMENTS has more features; since you have EiffelStudio up, you can check the details if you wish (use the contract form).
To specify execution arguments from within EiffelStudio, enter them, separated by spaces, in the corresponding field in Project --> Debug/Settings .
We have seen how to execute a compiled system from within EiffelStudio: choose one of the appropriate execution buttons, with or without breakpoints.
A finalized system can be executed on any computer of the appropriate platform; it doesn't need EiffelStudio. The executable version is in the directory
where project_directory is the project's directory. The name of the executable file is system_name .exe , where system_name is the name that you have assigned to your system in the project settings (reflected in the Ace file).
The name of our Guided Tour system is simple , so you can locate simple . exe in EIFGEN/F_code for your project, and run it stand-alone if you like.
If you run the system from a command line, and it requires arguments ( simple doesn't), you will provide the appropriate arguments after the command name:
Because various platforms have different conventions, "relative paths" referenced in your system will mean something different under Unix/Linux, where they relate to the directory from which the command is launched, and under Windows, where they relate to the application's directory.
A system compiled in "Workbench mode" -- frozen or melted -- is normally meant for execution within EiffelStudio, not for outside delivery, since it is not optimized. If you need to execute it outside of EiffelStudio, make sure that you have access to the system_name . melted file in project_directory /EIFGEN/W_code .
With this discussion of compilation and execution we have finished our review of the key capabilities of EiffelStudio. Not everything has been covered, but you are now familiar with the essentials and ready to discover the rest by yourself, both by trying out various capabilities -- most of which should be self-explanatory -- and examining the extensive online documentation that accompanies the product.
Eiffel Home Page (Web) -- Getting started with Eiffel (local)
Copyright Interactive Software Engineering, 2001