[erlang-bugs] module name with .

J K jmakarlsson@REDACTED
Tue Mar 2 00:06:56 CET 2010


Well... hehe, I know... i must have had a blackout or something...


----- Original Message ----
From: Bernard Duggan <bernie@REDACTED>
To: J K <jmakarlsson@REDACTED>
Cc: Erlang Bugs <erlang-bugs@REDACTED>
Sent: Sun, February 28, 2010 10:54:19 PM
Subject: Re: [erlang-bugs] module name with .

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
> error
>  
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').
> {ok,'fm2,2'}
>  
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' ;)

B


________________________________________________________________
erlang-bugs (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-bugs-unsubscribe@REDACTED


      


More information about the erlang-bugs mailing list