您的位置:首页 > 其它

如何使用命令行启动你的erl 程序

2014-08-23 00:00 274 查看
摘要: 在日常应用中,常需要将erl的程序嵌入你自己的应用。于是,想到是否使用命令行的方式,启动你的erl函数。

最近,在写做一个modbusTCP数据采集的工业控制项目。用eralng 写了数据通信的服务。但对非专业的用户来说,使用erl 的shell来启动应用 是不合理的。于是,想到使用命令行的方式启动顶层服务函数。

在这个例子中start:modbusTCP 是我要启动的顶层服务函数。start 是模块名。modbusTCP 是函数



more learing : if i hope add a parmeter for Server's Port?

you can use

"D:/programe File/erl6.0/bin/erl.exe" noshell-a "F:/erl_test/time" -s start modbusTCP 8088

be careful!!! the type of parementer you send to your script is a string . you have to covert it in your script
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  erlang comdline