Does anyone know of Prolog code for formatted input?

144 Views Asked by At

I need to read formatted data from files in Prolog, and something much like C-style "freadf"/"sscanf" would be ideal. Prolog's built-in "format" does a fairly good job at outputting formatted data, but I could not find anything remotely appropriate for input. I am currently using SICStus Prolog, but I am willing to port code from SWI-Prolog if necessary. One might argue that this could be done with a combination of get_char/get_byte, but if I can find ready and tested library/predicates, this would save me a fairly amont of time.

0

There are 0 best solutions below