12.3.1 Type term_t: a reference to a Prolog term
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • Interface Data Types
          • Type term_t: a reference to a Prolog term
            • PL_new_term_ref()
            • PL_new_term_refs()
            • PL_copy_term_ref()
            • PL_free_term_ref()
            • PL_reset_term_refs()
            • Interaction with the garbage collector and stack-shifter
    • Packages
Availability:C-language interface function
term_t PL_copy_term_ref(term_t from)
Create a new term reference and make it point initially to the same term as from. This function is commonly used to copy a predicate argument to a term reference that may be written. Raise a resource exception and returns (term_t)0 on failure. An example of its use is given below, in the sample code pl_write_atoms().