Open stevemolloy opened 6 days ago
I think it's possible to add this, though could you please first expand on the intended use case? There may be a better solution for it that uses only existing constructs.
Hi triska. My use case is as follows. I am parsing a json file into a number of prolog predicates, and I would like to write these to file. It would be simpler to append each of these as they are encountered, rather than having to build the entire character string and save that to file.
As one way to implement this with the current facilities, you can collect all predicates into a list (for instance, with findall/3
), and describe the list of characters corresponding to that list.
Could phrase_to_file in library(pio) be extended to also accept the file mode? I would like the option to open the file in append mode.