You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question for @triska (or anyone):
Let's say I have a query like:
?- between(1,3,X).
And I loop through the results in Prolog format:
forawait(constanswerofpl.query(`dif(A, B) ; dif(C, D).`,{format: "prolog"})){console.log(answer);};// prints:// "dif(A,B)."// "dif(C,D)."
Should these results include the fullstop?
I know that regular toplevels will return something like:
dif(A,B) ;
dif(C,D).
But usually we can't know whether it should end in "." or ";" until we loop again.
I was also thinking that returning a result like foo ; isn't useful because it's a partial term.
I made it optional but I'm not sure whether it'd be better to always exclude it, or always include it.
My rationale for including it is I would like each result (that doesn't write to stdout) to be parsable as a Prolog term.
The text was updated successfully, but these errors were encountered:
4.148 read-term: A term followed by an end token.
(see 6.2.2, 6.4.8).
end token (* 6.4.8 *)
= end char (* 6.4.8 *) ;
end char (* 6.4.8 *) = "." ;
Most importantly: It should be completely clear to users whether they must or must not enter ".". Personally, I think a sensible approach is to require users to enter it, and if it is not entered, somehow display an informational text saying for example: "Write '.' at the end of a query."
Question for @triska (or anyone):
Let's say I have a query like:
And I loop through the results in Prolog format:
Should these results include the fullstop?
I know that regular toplevels will return something like:
But usually we can't know whether it should end in "." or ";" until we loop again.
I was also thinking that returning a result like
foo ;
isn't useful because it's a partial term.I made it optional but I'm not sure whether it'd be better to always exclude it, or always include it.
My rationale for including it is I would like each result (that doesn't write to stdout) to be parsable as a Prolog term.
The text was updated successfully, but these errors were encountered: