rdf - Getting SWI-Prolog to convert Literal to number -


it quite miracle if following...

i'm using swi-prolog perform queries in triples rdf file. values can queried, instead of number, word literal shows in front of them (e.g [literal(500000)] shows value 500000). now, problem arises when have list of numbers want add. try convert these literals atoms prolog can recognize them numbers, following error

error: atom_number/2: type error: atom' expected, found [literal(500000)]'

any clues appreciated. thanks.

just use unification number. instance

?- [literal(500000)] = [literal(n)]. n = 500000. 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -