[erlang-bugs] module name with .
Sun Feb 28 22:54:19 CET 2010
Actually, all these look pretty much as I'd expect:
J K wrote:
> I tried comma just for "fun":
> 254> c(fm2,2).
> ./fm2.erl:none: no such file or directory
By putting a comma there you've passed two parameters to the 'c'
function. While the shell docs don't seem to mention it, a quick glance
at the source shows that there is indeed a c/2 where the second
parameter is the compilation options. So you're trying to compile a
module called 'fm2' with an option of 2 (which probably doesn't mean
anything, but the missing file is the first problem that is picked up).
> 255> compile:file(fm2,2.erl).
> * 1: illegal expression
Here, you've put a full stop/period in the middle of an expression
(prior to closing the parentheses). That's the character the ends
expressions, so of course it makes it illegal.
> 256> compile:file('fm2,2.erl').
And here, by correctly wrapping the whole term in single quotes to make
it an atom, the syntax becomes correct. The compile module seems to be
a little more permissive here than the docs suggest, allowing you to add
'.erl' to the module name and have it still work.
> Maybe something with the shell?
If by 'something with the shell' you mean 'the shell doing exactly what
it should', then yeah, I'd say there is indeed 'something with the shell' ;)
More information about the erlang-bugs