Next: cpg-ref-SP_get_list_n_codes, Previous: cpg-ref-SP_get_list_codes, Up: cpg-bif [Contents][Index]
SP_get_list_n_bytes()
#include <sicstus/sicstus.h> int SP_get_list_n_bytes(SP_term_ref term, SP_term_ref tail, size_t n, size_t *w, unsigned char *s);
Copies into the byte array s
the initial elements of
term
, which should hold a list of integers in the range [0,255], so
that at most n
bytes are used. The number of bytes actually
written is assigned to *w
. tail
is set to the remainder
of the list. The array s
must have room for at least
n
bytes.
The SP_term_ref holding the list
The SP_term_ref to be assigned the remainder of the list
Max number of bytes to use
Location to assign to number of bytes actually used
The location to assign to the encoded string
Zero if the conversion fails (as far as failure can be detected), and a nonzero value otherwise.