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