0
votes

I'm using Prolog in java through JPL, I have some predicates with the format predicate:

format("Result ~p, ",[X]),

Using JPL in java the output of format goes to the console output in java, how can I retrieve this result into a string variable in java?

Thanks in advance

1

1 Answers

0
votes

I don't know about JPL but can't you use sformat to format into a string variable, and then retrieve it via JPL ?

?- sformat(S, "Result ~p", [X]).