Difference between revisions of "Tutorial tour"
(following the French version) |
(→Easy starting: corrected a few mistakes + pagination) |
||
(One intermediate revision by the same user not shown) | |||
Line 9: | Line 9: | ||
'''Hello world...''' To execute the program, go to the <code>SmartEiffel/tutorial</code> directory and execute the command: |
'''Hello world...''' To execute the program, go to the <code>SmartEiffel/tutorial</code> directory and execute the command: |
||
− | se c |
+ | se c HELLO_WORLD make -o hello |
+ | The meaning of the command is |
||
− | The command produces an executable, usually <code>hello</code> or <code>hello.exe</code> depending on the system. Run it. |
||
+ | {| |
||
+ | |- |
||
+ | |<code>se</code> |
||
+ | |the front-end tool for the SmartEiffel compiler |
||
+ | |- |
||
+ | |<code>c</code> |
||
+ | |the tool invoked by <code>se</code> for compile into an executable |
||
+ | |- |
||
+ | |<code>HELLO_WORLD</code> |
||
+ | |the class of which an object is created (you may also write it in lower-case, or use its filename with the <code>.e</code> extension) |
||
+ | |- |
||
+ | |<code>make</code> |
||
+ | |the creation procedure of the <code>HELLO_WORLD</code> class to call |
||
+ | |- |
||
+ | |<code>-o hello</code> |
||
+ | |generates an executable with the name hello (linux) or hello.exe (windows) |
||
+ | |} |
||
+ | |||
+ | The command produces an executable, usually <code>hello</code> or <code>hello.exe</code> depending on the system. After finish of compiling you can run the executable. |
||
This unavoidable program is in <code>hello_world.e</code> and lets you grasp the basic concepts of Eiffel. Those concepts are: |
This unavoidable program is in <code>hello_world.e</code> and lets you grasp the basic concepts of Eiffel. Those concepts are: |
||
Line 28: | Line 47: | ||
* parking |
* parking |
||
* triangle |
* triangle |
||
+ | |||
+ | To compile the other samples you must modify the compiler command. |
||
== Some important concepts == |
== Some important concepts == |
Revision as of 22:19, 12 May 2007
Welcome in the guided tour of the tutorial!
All the classes in the tutorial are provided with your SmartEiffel installation, int the tutorial
directory.
Easy starting
Hello world... To execute the program, go to the SmartEiffel/tutorial
directory and execute the command:
se c HELLO_WORLD make -o hello
The meaning of the command is
se
|
the front-end tool for the SmartEiffel compiler |
c
|
the tool invoked by se for compile into an executable
|
HELLO_WORLD
|
the class of which an object is created (you may also write it in lower-case, or use its filename with the .e extension)
|
make
|
the creation procedure of the HELLO_WORLD class to call
|
-o hello
|
generates an executable with the name hello (linux) or hello.exe (windows) |
The command produces an executable, usually hello
or hello.exe
depending on the system. After finish of compiling you can run the executable.
This unavoidable program is in hello_world.e
and lets you grasp the basic concepts of Eiffel. Those concepts are:
- Everything is a class. In Eiffel, out of classes there is no salvation.
- The program starts by creating an object. Here, the method is the
make
creation feature in the classHELLO_WORLD
. - Each file is named after the name of the class, lower-case, with the
.e
extension. - Note the special object
io
that allows to write text on the standard output. We will see that it also allows to read data. - For the Eiffel syntax, look here.
Also to look at:
- fibonacci.e
- knight.e
- pyramide.e and pyramide2.e
- gcd
- hanoi
- parking
- triangle
To compile the other samples you must modify the compiler command.
Some important concepts
ACE files
Input-output
- io
- directory
- basic_directory?
Arguments
print_arguments.e
Collections
including iterator and sorting
Manifest notations
manifest_notation.e
Downcasting
downcasting.e
To go further
Agents
... and tuples
external
cecil
Memory management
memory
Extension libraries
Random
Date & time
Storable
Sequencer
Vision
visiopn, signal