12.4.4 Constructing Terms
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • The Foreign Include File
          • Constructing Terms
            • PL_put_variable()
            • PL_put_atom()
            • PL_put_bool()
            • PL_put_chars()
            • PL_put_atom_chars()
            • PL_put_string_chars()
            • PL_put_string_nchars()
            • PL_put_list_chars()
            • PL_put_integer()
            • PL_put_int64()
            • PL_put_uint64()
            • PL_put_pointer()
            • PL_put_float()
            • PL_put_functor()
            • PL_put_list()
            • PL_put_nil()
            • PL_put_term()
            • PL_cons_functor()
            • PL_cons_functor_v()
            • PL_cons_list()
            • PL_put_dict()
    • Packages
Availability:C-language interface function
int PL_put_dict(term_t -h, atom_t tag, size_t len, const atom_t *keys, term_t values)
Create a dict from a tag and vector of atom-value pairs and put the result in h. The dict's key is set by tag, which may be 0 to leave the tag unbound. The keys vector is a vector of atoms of at least len long. The values is a term vector allocated using PL_new_term_refs() of at least len long. This function returns TRUE on success, FALSE on a resource error (leaving a resource error exception in the environment), -1 if some key or the tag is invalid and -2 if there are duplicate keys.