I need to compile Prolog code into an executable that reads two parameters (one a text string and the other a number)
%test.pl:
main([A,N]) :-
Z is 2 * N,
write(A), nl,
write(Z), nl.
Using the Ciao interpreter I get:
?- main([hi,5]).
hi
10
But running the same code when compiled using ciaoc give the following error:
~ $ ciaoc test.pl
~ $ ./test hi 5
{ERROR: No handle found for thrown error error(type_error(evaluable,5),arithmetic:is/2-2)}