Difference between revisions of "Compiling Hello World"
(Added initial version of Hello World example.) |
m (syntax update) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:General]] | ||
The Hello Word example looks like this: | The Hello Word example looks like this: | ||
<code>[eiffel,N] | <code>[eiffel,N] | ||
class | class | ||
− | + | ROOT_CLASS | |
create | create | ||
− | + | make | |
feature -- Initialization | feature -- Initialization | ||
− | + | make | |
− | + | -- Creation procedure. | |
− | + | do | |
− | + | io.put_string ("Hello World!") | |
− | + | end | |
end | end | ||
Line 24: | Line 25: | ||
# In the new dialog that appears, enter the location of the project and select "OK" | # In the new dialog that appears, enter the location of the project and select "OK" | ||
# Choose your target, that is to say whether you are compiling for C code ('''sample''') or for .NET ('''sample_dotnet''') | # Choose your target, that is to say whether you are compiling for C code ('''sample''') or for .NET ('''sample_dotnet''') | ||
− | # Once the compilation is done, type ROOT_CLASS in the Class entry | + | # Once the compilation is done, type ROOT_CLASS in the Class entry of the ''Address Bar'' toolbar. This will load the ROOT_CLASS in the editor. |
# Enter the above text for ROOT_CLASS | # Enter the above text for ROOT_CLASS | ||
− | # Click the '''Compile''' button | + | # Click the '''Compile''' button of the ''Project Bar'' toolbar. |
− | # Click the '''Start''' button | + | # Click the '''Start''' button of the ''Project Bar'' toolbar to start the execution and see the output of your program. |
Latest revision as of 05:59, 23 March 2013
The Hello Word example looks like this:
class ROOT_CLASS create make feature -- Initialization make -- Creation procedure. do io.put_string ("Hello World!") end end
To compile this sample, we suggest that you use the Basic application wizard to create the project. And once the project is created to update the ROOT_CLASS with the above content. The required steps are:
- Start EiffelStudio
- Select the Basic application entry from the Create project section and click Create
- In the new dialog that appears, enter the location of the project and select "OK"
- Choose your target, that is to say whether you are compiling for C code (sample) or for .NET (sample_dotnet)
- Once the compilation is done, type ROOT_CLASS in the Class entry of the Address Bar toolbar. This will load the ROOT_CLASS in the editor.
- Enter the above text for ROOT_CLASS
- Click the Compile button of the Project Bar toolbar.
- Click the Start button of the Project Bar toolbar to start the execution and see the output of your program.