Next: , Previous: , Up: cpg-bif   [Contents][Index]


12.3.31 SP_get_float()

Synopsis

#include <sicstus/sicstus.h>

int
SP_get_float(SP_term_ref term,
             double *f);

Assigns to *f the float that corresponds to a Prolog number.

If the term is an integer that does not fit in a double, then the call will fail.

Arguments

term

The SP_term_ref holding the value

f

The location to assign

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.