The PlCompound
class is a convenience class for creating
a term from a string; it is similar to (=..)/2
- PlCompound :: PlCompound(const wchar_t *text)
- PlCompound :: PlCompound(const char *text)
- PlCompound :: PlCompound(const std::wstring&
text)
- PlCompound :: PlCompound(const std::string&
text)
- PlEncoding enc=ENC_INPUT Create a term by parsing (as read/1)
the text. If the text is not valid Prolog syntax,
a
syntax_error
exception is raised. Otherwise a new
term-reference holding the parsed text is created.
- PlCompound :: PlCompound(const wchar_t
*functor, PlTermv args)
- PlCompound :: PlCompound(const char *functor,
PlTermv args)
- Create a compound term with the given name from the given vector of
arguments. See
PlTermv
for details. The example below
creates the Prolog term hello(world)
.
PlCompound("hello", PlTermv(PlAtom("world")))