<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Thanks so much! I hadn't seen that.<br>
</p>
<div class="moz-cite-prefix">On 12/24/2018 4:45 AM, Guilherme
Andrade wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAA5f+NVEuH4z=M03F4-DFzWWanZbO_o6QMYrVfPChT=e6cAXJw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">Only certain built-in functions may be used in if
clauses, function guards, case clause guards, and so on. They
are listed under 'Expressions'[1], on the reference manual.<br>
<br>
</div>
<div>What I believe you would like to do is usually achieved
using case expressions, which allow the evaluation of regular
function calls. 'If' clauses are uncommon nowadays and it's
rare for them to be considered more appropriate than the
equivalent case clause or function head pattern.<br>
</div>
<div dir="ltr"><br>
[1]: <a
href="http://erlang.org/doc/reference_manual/expressions.html#guard-sequences"
moz-do-not-send="true">http://erlang.org/doc/reference_manual/expressions.html#guard-sequences</a><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Mon, 24 Dec 2018 at 00:26, Donald Steven <<a
href="mailto:t6sn7gt@aim.com" moz-do-not-send="true">t6sn7gt@aim.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This
code works:<br>
<br>
AlphaNumericChar = isAlphaNumeric(C),<br>
if AlphaNumericChar -><br>
<br>
but this code (which is functionally identical):<br>
<br>
if isAlphaNumeric(C) -><br>
<br>
produces an error message: call to local/imported function <br>
isAlphaNumeric/1 is illegal in guard<br>
<br>
Why?<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank"
moz-do-not-send="true">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote>
</div>
<br clear="all">
<br>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">Guilherme<br>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</body>
</html>