<pre name="code" class="plain">% Hello world
"Hello world!". % 每句都以.结束
% hello_world.erl
-module (hello_world). % 声明模块
-export ([hello/0]). % 声明方法
hello() -> "Hello World!". % 实现方法
实际操作效果:
%递归--实现阶乘和斐波那契数列
-module (yet_again).
-export ([another_factorial/1]).
-export ([another_fib