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
PL_get_nchars() with CVT_WRITEQ does the right thing with f('a b') or f("a b") but not for a b or "a b" -- the latter result in strings without surrounding quotes. (I have test cases in an upcoming PR)
Is this expected behaviour?
The text was updated successfully, but these errors were encountered:
Test cases for these are in test_cpp.cpp (predicate get_nchars_string/4) and test_cpp.pl (tests nchars). (Requires SWI-Prolog/packages-cpp#68)
You can replicate this by the following (the test code outputs its interpretation of the flags - I do this to make sure that my flags handling is correct):
~/src/swipl-devel/build.debug/src/swipl -l ~/src/swipl-devel/packages/cpp/test_cpp.pl
Welcome to SWI-Prolog (threaded, 64 bits, version 9.3.1-3-gac96195a7-DIRTY)
?- get_nchars_string("a b", [all,writeq,variable], S, F).
S = "a b",
F = "all,variable,writeq".
?- get_nchars_string(f("a b"), [all,writeq,variable], S, F).
S = "f(\"a b\")",
F = "all,variable,writeq".
PL_get_nchars() with
CVT_WRITEQ
does the right thing withf('a b')
orf("a b")
but not fora b
or"a b"
-- the latter result in strings without surrounding quotes. (I have test cases in an upcoming PR)Is this expected behaviour?
The text was updated successfully, but these errors were encountered: