<html><body style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 12px;">dear list,<div>i am learning Erlang and trialling IntelliJ IDEA.</div><div>when i try to 'edit configurations' before 'debug',</div><div>i get crash dumps with messages like;</div><div>N is an unbound variable,</div><div>init terminating in do_boot().</div><div><br /></div><div>when entering the details into 'edit configurations'</div><div>IJ does not specifically ask for arity,</div><div>rather, 'argument'.</div><div><br /></div><div><span style="color:rgb(51,51,51);line-height:19.2000007629395px;">-module(fac/1). % from p.165 of joe's book</span><br style="color:rgb(51,51,51);line-height:19.2000007629395px;" /><span style="color:rgb(51,51,51);line-height:19.2000007629395px;">-export([main/1]).</span><br style="color:rgb(51,51,51);line-height:19.2000007629395px;" /><span style="color:rgb(51,51,51);line-height:19.2000007629395px;"> main([A])-></span><br style="color:rgb(51,51,51);line-height:19.2000007629395px;" /><span style="color:rgb(51,51,51);line-height:19.2000007629395px;"> I = list_to_integer(atom_to_list(A)),</span><br style="color:rgb(51,51,51);line-height:19.2000007629395px;" /><span style="color:rgb(51,51,51);line-height:19.2000007629395px;"> F = fac(I),</span><br style="color:rgb(51,51,51);line-height:19.2000007629395px;" /><span style="color:rgb(51,51,51);line-height:19.2000007629395px;"> io:format("factorial ~w = ~w~n", [I,F]),</span><br style="color:rgb(51,51,51);line-height:19.2000007629395px;" /><span style="color:rgb(51,51,51);line-height:19.2000007629395px;"> init:stop().</span><br style="color:rgb(51,51,51);line-height:192000007629395px;" /><br style="color:rgb(51,51,51);line-height:19.2000007629395px;" /><span style="color:rgb(51,51,51);line-height:19.2000007629395px;"> fac(0) -> 1;</span><br style="color:rgb(51,51,51);line-height:19.2000007629395px;" /><span style="color:rgb(51,51,51);line-height:19.2000007629395px;"> fac(N) -> N*fac(N-1).</span><br style="color:rgb(51,51,51);line-height:19.2000007629395px;" /><br style="color:rgb(51,51,51);line-height:19.2000007629395px;" /><span style="color:rgb(51,51,51);line-height:19.2000007629395px;">I am using the current version of Erlang and the latest upgrade for IJ on Win 7, 64..</span><br />if fac is the module,</div><div>and main is the function,</div><div>then, what would you say is the argument?<br /><br /></div></body></html>