/tutorial/ace/example1.ace

http://github.com/tybor/Liberty · Unknown · 46 lines · 44 code · 2 blank · 0 comment · 0 complexity · 3a720281f2fdd060815f5390e0e8ee51 MD5 · raw file

  1. -- An ACE file defines the environment for a project, together with its root
  2. -- class and initial creation procedure.
  3. --
  4. -- ACE is an abbreviation of Assembly of Classes in Eiffel.
  5. --
  6. -- Use of an ACE file obviates the need for specifying many options on the
  7. -- command line and ensures consistency between successive compilations or
  8. -- other operations on the project. Such consistency makes it easier to test
  9. -- and debug, since changes from one compilation to the next are guaranteed to
  10. -- be limited to coding changes rather than to changes in the compilation
  11. -- environment.
  12. --
  13. -- To launch the compilation with this ACE file, just type:
  14. --
  15. -- compile example1.ace
  16. --
  17. -- This is a very simple example with the most basic ACE file.
  18. --
  19. system
  20. -- The system section is introduced by the keyword system followed by
  21. -- the name to be given to the executable program which will be produced
  22. -- by a compilation. The system name should be enclosed in double
  23. -- quotes.
  24. "hello"
  25. root
  26. -- The root section defines the root class of the system and the initial
  27. -- creation procedure. The creation procedure is the routine which is
  28. -- executed first when the executable program is run; it is equivalent
  29. -- to main() in a C program. This procedure must be a procedure in the
  30. -- root class and must be declared as a creation procedure in that
  31. -- class.
  32. HELLO_WORLD: main
  33. cluster
  34. -- The cluster section is introduced by the keyword cluster and defines
  35. -- an ordered list of clusters. Roughly speaking, a cluster can be
  36. -- considered as a directory in which Eiffel source files are to be
  37. -- searched for. The order of this list of clusters is important because
  38. -- clusters are considered sequentially when searching for an Eiffel
  39. -- source file. The first class file found in the search is the one that
  40. -- will be used. Also note that one may only use the / character as the
  41. -- directory separator.
  42. "${path_tutorial}"
  43. "${path_liberty_core}/loadpath.se"
  44. end