hello.erl 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. % what a weird language ... :-)
  2. %%% @author Przemyslaw Rzepecki
  3. %%% @version 0.01
  4. %%% @doc == Hello World, Example Module ==
  5. %%% This module contains some Erlang code for WAF build system support for
  6. %%% Erlang language.
  7. %%% @end
  8. -module(hello).
  9. -export([say_hello/1, hello_world/0]).
  10. -include("hello.hrl").
  11. %%% ###########################################################################
  12. %% @doc Returns a greetings string
  13. %%
  14. %% Some more specific description of the function should be written here...
  15. %%
  16. %% See http://erlang.org/doc/apps/edoc/users_guide.html for the complete Edoc
  17. %% guide.
  18. %%
  19. %% @end
  20. %%% ----------------------------------------------------------
  21. say_hello(waf) -> "Hello WAF, cool to see you!";
  22. say_hello(make) -> "Oh Make, you again...";
  23. say_hello(Other) -> "Hi " ++ Other.
  24. %%% ###########################################################################
  25. %% @doc Print a 'Hello World' string to stdout of the program..
  26. %%
  27. %% This is an Erlang Version of the famous hello_world function.
  28. %%
  29. %% @end
  30. %%% ----------------------------------------------------------
  31. hello_world() -> io:fwrite("~p~n", [?HELLO_WORLD]).