Download SICStus Prolog User`s Manual

Transcript
Chapter 12: C Reference Pages
1243
12.3.25 SP_get_arg()
Synopsis
#include <sicstus/sicstus.h>
int
SP_get_arg(int i,
SP_term_ref term,
SP_term_ref arg);
Assigns to arg the i:th argument of a compound term. This is similar to calling arg/3.
Arguments
i
The (one-based) argument number
term
The SP term ref holding the compound term
arg
The SP term ref to be assigned
Return Value
Zero if the conversion fails (as far as failure can be detected), and a nonzero value otherwise.
See Also
Section 6.4.4 [Accessing Prolog Terms], page 299.