erlang程序运行的几种方式
2012-01-15 12:58
253 查看
1.在erlang
shell中编译运行
view source
print?
2 在命令行提示符下编译运行
view source
print?
快速脚本
view source
print?
3 当做escript脚本运行
view source
print?
shell中编译运行
1 -module(hello). 2 -export([start/0]). 3 4 start() -> 5 io:format("Hello world~n").
view source
print?
erl |
Erlang R14B03 (erts-5.8.4) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false] |
Eshell V5.8.4 (abort with ^G) |
1> c(hello). |
{ok,hello} |
2> hello: |
module_info/0 module_info/1 start/0 |
2> hello:start(). |
Hello world |
ok |
3> |
view source
print?
erlc hello.erl |
erl-noshell -s hello start -s init stop |
view source
print?
erl- eval 'io:format("Memory:~p~n",[erlang:memory(total)]).' -noshell -s init stop |
1 #!/usr/bin/escript 2 3 main(_) -> 4 io:format("Hello World~n").
view source
print?
chmod +x hello |
./hello |
相关文章推荐
- erlang程序运行的几种方式
- [erlang]erlang程序运行的几种方式
- Spark on yarn--几种提交集群运行spark程序的方式
- scala程序运行的几种方式
- Unix/Linux中后台运行程序(断开shell连接后继续执行)的几种方式
- 运行Python程序的几种方式
- python实现将程序以守护进程的方式运行
- C++以阻塞的方式调用外部exe程序,等待其运行结束
- 电脑开机自动运行程序的几种方法
- 让Tomcat运行PHP的几种方式
- php在apache运行的几种方式比较和使用
- Python实现运行其他程序的四种方式实例分析
- PHP 调用外部程序的几种方式
- Atitit.hybrid混合型应用 浏览器插件,控件的实现方式 浏览器运行本地程序的解决方案大的总结---提升用户体验and开发效率..
- 程序自启动及后台持续运行的研究(voip和GPS方式)
- 使C#程序脱离.net框架运行(非飞信方式)
- android完全退出程序的几种方式
- 说说 Windows 脚本宿主运行的几种方式
- 获取程序运行路径的几种方法
- hadoop中mapreduce程序的几种提交运行模式