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
Use atom_number/2. E.g:
atom_number('123', X).
X = 123.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With