PROFEXPR(3)

NAME
profExpr - returns the depth of an expression.

SYNOPSYS
#include "logmmm.h"
int profExpr(expr)
chain_list *expr;

PARAMETER

expr
    expression

DESCRIPTION
profExpr() returns the depth of expr.

EXAMPLE
#include "mutnnn.h"		/* mbk utilities */
#include "logmmm.h"
chain_list *expr1,*expr2;
expr1 = createExpr(OR);
addQExpr(expr1,createAtom("a"));
addQExpr(expr1,createAtom("b"));
expr2 = createAtom("a");
printf("%d",profExpr(expr2));
printf("%d",profExpr(expr1));
expr = notExpr(expr1);
printf("%d",profExpr(expr1));
/* it will display
0
1
2
*/
freeExpr(expr1);
freeExpr(expr2);

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