浏览 1425 次
锁定老帖子 主题:erlang的abstract code
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2009-09-30
[root@localhost ~]# erl -s hello Erlang R13B02 (erts-5.7.3) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false] hello world Eshell V5.7.3 (abort with ^G) 1> BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded (v)ersion (k)ill (D)b-tables (d)istribution [root@localhost ~]# cat hello.erl -module(hello). -export([start/0]). start()-> io:format("hello world~n",[]). [root@localhost ~]# erlc +debug_info hello.erl [root@localhost ~]# erl Erlang R13B02 (erts-5.7.3) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false] Eshell V5.7.3 (abort with ^G) 1> rp(beam_lib:chunks(hello, [abstract_code])). {ok,{hello,[{abstract_code,{raw_abstract_v1,[{attribute,1, file, {"./hello.erl",1}}, {attribute,1,module,hello}, {attribute,2,export,[{start,0}]}, {function,4,start,0, [{clause,4,[],[], [{call,5, {remote,5,{atom,5,io},{atom,5,format}}, [{string,5,"hello world~n"},{nil,5}]}]}]}, {eof,6}]}}]}} ok 2> 对着文档开始好好分析吧。 Have fun! 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |