Next: , Previous: cpg-ref-SP_get_list_n_codes, Up: cpg-bif

12.3.39 SP_get_number_codes()


     #include <sicstus/sicstus.h>
     SP_get_number_codes(SP_term_ref term,
                         char const **s);

Assigns to *s a zero-terminated array of characters corresponding to the printed representation of a Prolog number. The array is subject to reuse by other support functions, so if the value is going to be used on a more than temporary basis, it must be moved elsewhere.


The SP_term_ref holding the number
The location to assign to the array

Return Value

Zero if the conversion fails (as far as failure can be detected), and a nonzero value otherwise.

See Also

Accessing Prolog Terms.

Send feedback on this subject.