I need to convert a Prolog atom to an integer. For example:
?- convert('123', X).
X = 123
yes
I have seen some SO answers about that, but they rely on SWI-Prolog, and I am forced to use SICStus Prolog. Casting to string will also do the job, as I am aware of the number_codes/2
predicate.
Thanks for your help.