Eiffel


Firstly the HELLO_WORLD class (hello_world.e)

------------------------------------------------>

class HELLO_WORLD

creation
        make
feature
        make is
        local
                io:BASIC_IO
        do
                !!io
                io.put_string("%N Hello World!!!!")
        end --make

end -- class HELLO_WORLD


------------------------------------------------>

and then the program to run the hello_world class (hello_prog.pdl)

------------------------------------------------>
program hello_prog

root
    HELLO_WORLD: "make"


cluster

    "./"

    end

    include  "$EIFFEL_S/library/lib.pdl"


end -- hello_prog

------------------------------------------------->

submitted by: Paul B. Hayes (Paul.Bouchier-Hayes@Ireland.Sun.COM)


This Hello World example compiles very fast and the executable is only 10K bytes in size.

class HELLO_WORLD

-- With options -boost -02 the final executable size is only 10k

creation make

feature

   make is
      do
         io.put_string("Hello World in Eiffel.%N")
      end  -- make

end -- class HELLO_WORLD

-- Compilers used: SmallEiffel + GCC
-- SmallEiffel is a GNU compiler available at http://SmallEiffel.loria.fr/

submitted by: Kolari S. Bhat (kolari.s.bhat@vanderbilt.edu)