Oh, I see. I did not know that. It's been about two weeks since I started learning Erlang. Forgive me that I asked a silly question. <br><br>I feel embarrassed a bit. But I was able to learn more about it, anyway. <br>
<br>Thank you very much !<br><br>Chiharu<br><br><br><div class="gmail_quote">2009/5/1 Per Melin <span dir="ltr"><<a href="mailto:per.melin@gmail.com">per.melin@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Kawatake Chiharu:<br>
<div class="im">> I found that erl and escript behaved differently when the string module was<br>
> used for unicode strings.<br>
><br>
> Attached are what I tried to run with erl and escript. I also copied the<br>
> code at the bottom of this e-mail.<br>
><br>
> When I did<br>
><br>
> %> escript test.erl<br>
><br>
> This works fine.<br>
><br>
> However, when I used erl to run it, I got an error as follows.<br>
><br>
> ------------------<br>
> %> erlc test.erl<br>
> %> erl -noshell -s test main -s init stop<br>
> {"init terminating in<br>
> do_boot",{undef,[{test,main,[]},{init,start_it,1},{init,start_em,1}]}}<br>
<br>
</div>The error {undef,[{test,main,[]}, ...]} actually tells you what the<br>
problem is; there is no function 'main' in the module 'test' with<br>
arity zero (i.e. test:main/0).<br>
<br>
You can either start your program like this:<br>
<div class="im"><br>
erl -noshell -s test main "" -s init stop<br>
<br>
</div>...or add this to your code:<br>
<br>
main() -> main([]).<br>
<br>
...and it should work.<br>
</blockquote></div><br>