博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
erlang程序运行的几种方式
阅读量:4702 次
发布时间:2019-06-10

本文共 678 字,大约阅读时间需要 2 分钟。

 

1.在erlang 中编译运行

1 -module(hello).2 -export([start/0]).3 4 start() ->5     io:format("Hello world~n").

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>  

2 在命令行提示符下编译运行

erlc hello.erl
erl -noshell -s hello start -s init stop

快速脚本

erl -eval 'io:format("Memory:~p~n",[erlang:memory(total)]).' -noshell -s init stop

3 当做escript脚本运行

1 #!/usr/bin/escript2 3 main(_) ->4     io:format("Hello World~n").

chmod +x hello
./hello

转载于:https://www.cnblogs.com/xiayong123/archive/2012/01/15/3717157.html

你可能感兴趣的文章
【Educational Codeforces Round 48 (Rated for Div. 2) D】Vasya And The Matrix
查看>>
正则表达式的性能评测
查看>>
CF1172B Nauuo and Circle
查看>>
CF1178D Prime Graph
查看>>
CF1190D Tokitsukaze and Strange Rectangle
查看>>
CF1202F You Are Given Some Letters...
查看>>
CF1179C Serge and Dining Room
查看>>
CF1168B Good Triple
查看>>
CF1208E Let Them Slide
查看>>
CF1086E Beautiful Matrix
查看>>
在单位上班的25条建议(建议收藏)
查看>>
web前端--http协议
查看>>
欧拉定理证明&阶乘的逆元
查看>>
Prime Game Gym - 101981J(网络流/二分图)
查看>>
Teamwork Gym - 101492E (dp)
查看>>
No Link, Cut Tree! Gym - 101484F(dp)
查看>>
Coprimes Gym - 101492C(bitset)
查看>>
Partial Tree UVALive - 7190(完全背包)
查看>>
『深度应用』NLP机器翻译深度学习实战课程·零(基础概念)
查看>>
『开发技术』Windows极简安装使用face_recognition实现人脸识别
查看>>