<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello, <br>
<br>
I have this programm : <br>
<br>
-module(shapes).<br>
<br>
-import(math, [sqrt/1]).<br>
<br>
area({square, Side}) -><br>
Side * Side ;<br>
<br>
area({circle, Radius}) -><br>
math:pi() * Radius * Radius;<br>
<br>
area({triangle, A, B, C}) -><br>
S = (A + B + C)/2,<br>
math:sqrt(S*(S-A)*(S-B)*(S-C));<br>
<br>
area(Other) -><br>
{error, invalid_object}.<br>
<br>
<br>
As soon I as try to compile it , I see these messages : <br>
<br>
<input class="terminal-input">
<div data-row="1" class="terminal-row">6> c(shapes). </div>
<div data-row="2" class="terminal-row">shapes.erl:5: Warning: function area/1 is unused </div>
shapes.erl:15: Warning: variable 'Other' is unused <br>
<br>
Why does Erlang do this?<br>
On compile time you cannot see which functions are used and which
not in my oponion.<br>
<br>
Roelof<br>
<br>
<br>
</body>
</html>