SEARCHNUMEXPR(3)

NAME
searchNumExpr - fetches the i-th argument in an operator expression.

SYNOPSYS
#include "logmmm.h"
chain_list *searchNumExpr(expr,i)
chain_list *expr;
int i;

PARAMETERS

expr
    expression

i   index of the argument

DESCRIPTION
searchNumExpr() fetches the i-th argument of expr. As an array of C-programming, the indedx of the first argument is 0. This function returns an argument that isn't duplicated.

EXAMPLE
#include "mutnnn.h"		/* mbk utilities */
#include "logmmm.h"
chain_list *expr;
expr = createExpr(OR);
addQExpr(expr,createAtom("a"));
addQExpr(expr,createAtom("b"));
displayExpr(searchNumExpr(expr,1));
/* it will display
b
*/
freeExpr(expr);

ERROR
"searchNumExpr : error - index out of bound"
index i must be included between 0 and lengthExpr(expr)-1.

SEE ALSO
log(1), abl(1), deleteNumExpr(3), searchOperExpr(3), equalExpr(3), equalVarExpr(3), lengthExpr(3), profExpr(3), numberAtomExpr(3), numberOccExpr(3).