So as the title says - how do you convert a string into an integer? the idea is something like this:
convert(String,Integer).
examples:
convert('1',1).
convert('33',33).
I'm using swi prolog
So as the title says - how do you convert a string into an integer? the idea is something like this:
convert(String,Integer).
examples:
convert('1',1).
convert('33',33).
I'm using swi prolog
Quite an old, but there is a predicate in SWI Prolog: number_string(N, S).
number_string(123, S).
S = "123".
For those who are still looking for it.