开发者

Erlang - Can a module name start with a capital letter?

Erlang Can a modul开发者_JS百科e name start with a capital letter?


A module name is an atom, so it must normally start with a lowercase letter, unless you enclose it in single quotes. This is actually possible:

%% in Foo.erl
-module('Foo').
...

%% in Erlang shell
1> 'Foo':foo().
"foo"

But completely horrible, so don't do this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜