• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

1.11 Overview of accessing and changing values
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • A C++ interface to SWI-Prolog
        • A C++ interface to SWI-Prolog
          • Overview of accessing and changing values
            • Converting PlTerm to native C and C++ types
            • Unification
            • Comparison
            • Analysing compound terms
            • Miscellaneous
            • The class PlTerm_string
            • The class PlCodeList
            • The class PlCharList
            • The class PlCompound
            • The class PlTerm_tail
            • The class PlTermv
            • The class PlAtom - Supporting Prolog constants
            • Classes for the recorded database: PlRecord and PlRecordExternalCopy

1.11.9 The class PlCompound

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")))

ClioPatria (version V3.1.1-51-ga0b30a5)