关注开源技术(黑龙江。哈尔滨) 倡导企业级开源应用,探索信息化方案标准; 集成开源众多新成果,消除开源方案忧与患; 力推低成本开源战车,笑纳八方来客叙开源; 普及开源知识助推力,喜迎开源企业展宏图;

The Erlang Shell

2008-01-02 15:37:20 / 个人分类:开源开发类

Most operating systems have a command interpreter or shell, Unix and Linux have many, Windows has the Command Prompt. Erlang has its own shell where you can directly write bits of Erlang code and evaluate (run) them to see what happens. Start the Erlang shell (in Linux or UNIX) by starting a shell or command interpreter in your operating system and typing erl, you will see something.
tut.erl
code--start
-module(tut).
-export([double/1]).
double(X) ->
        2 * X.
code--end
fuqiang@fuqiang-laptop:~$ erl
Erlang (BEAM) emulator version 5.5.5 [source] [async-threads:0] [kernel-poll:false]

Eshell V5.5.5  (abort with ^G)
1> c(tut).
{ok,tut}
2> tut:double(10).
20
3>
ubuntu 7.10
c(tut).--->{ok,tut}代表编译成功;
tut:double(10).--->调用tut中的double;
erlang源文件*.erl.



TAG: 开源开发类

我来说两句

(可选)

Open Toolbar