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_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()
    • Packages
Availability:C-language interface function
int PL_put_chars(term_t -t, int flags, size_t len, const char *chars)
New function to deal with setting a term from a char* with various encodings. The flags argument is a bitwise or specifying the Prolog target type and the encoding of chars. A Prolog type is one of PL_ATOM, PL_STRING, PL_CODE_LIST or PL_CHAR_LIST. A representation is one of REP_ISO_LATIN_1, REP_UTF8 or REP_MB. See PL_get_chars() for a definition of the representation types. If len is -1 chars must be zero-terminated and the length is computed from chars using strlen().