<div dir="ltr">Thank you so much Mr. Somogyi! I know I am an idiot, so thank you for taking the time to explain everything.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 7, 2017 at 8:40 PM, Zoltan Somogyi <span dir="ltr"><<a href="mailto:zoltan.somogyi@runbox.com" target="_blank">zoltan.somogyi@runbox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On Tue, 7 Nov 2017 20:32:18 -0500, zeldangit <<a href="mailto:zeldangit@gmail.com">zeldangit@gmail.com</a>> wrote:<br>
> I am currently making my way through Ralph Becket Mercury tutorial and I am<br>
> stuck trying to add a simple length function to my program. Here it is<br>
> along with the error I am having<br>
</span>> <<a href="https://gist.github.com/zeldangit/9448809d80f7613d74189feb9f5529ac" rel="noreferrer" target="_blank">https://gist.github.com/<wbr>zeldangit/<wbr>9448809d80f7613d74189feb9f5529<wbr>ac</a>>. Any<br>
<span class="">> help would be much appreciated.<br>
<br>
</span>You didn't import the int module. In Mercury, the arithmetic operations<br>
on a type such as int or float are in scope only if you import the Mercury<br>
standard library module that defines those operations. (You would be<br>
surprised by how many modules don't do any arithmetic at all.)<br>
<br>
After you fix that error, you will get another one about the call to length<br>
in the second clause being ambiguous, because the list module also defines<br>
a function named length. You will need to either rename your function<br>
or add a module qualification to the call to remove the ambiguity.<br>
<span class="HOEnZb"><font color="#888888"><br>
Zoltan.</font></span></blockquote></div><br></div>