我在当前目录中有一个文件.erlang我运行erl shell编译一些模块 .
有没有办法从Erlang shell重新运行此文件 .
我运行erl我得到shell 1>并从那里运行run_file(“ . erlang”),这个文件执行当前shell中的指令并加载env .
该文件看起来像
compile:file(file1). compile:file(file2). compile:file(file3). ...
你在找file:eval/1 .
鉴于 .erlang 具有以下内容:
.erlang
io:format("Hello world!~n").
你得到:
Eshell V5.7.5 (abort with ^G) 1> file:eval(".erlang"). Hello, world! ok
你可能想看看escript .
2 回答
你在找file:eval/1 .
鉴于
.erlang
具有以下内容:你得到:
你可能想看看escript .