numberOccExpr(2)

ORIGIN
Cao-vlsi libraries, log package, libablmmm.a

NAME
numberOccExpr - returns the number of time an atom appears in an expression.

SYNOPSIS
#include "logmmm.h"
int numberOccExpr(expr,name)
chain_list *expr;
char *name;

PARAMETERS

expr
    expression

name
    name of the atom

DESCRIPTION
numberOccExpr() returns the number of time name appears in 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 = createExpr(OR);
addQExpr(expr2,createAtom("c"));
addQExpr(expr2,createAtom("a"));
addQExpr(expr1,expr2);
printf("%d",numberOccExpr(expr1));
/* it will display
2
*/
freeExpr(expr1);	/* don't free expr2 ! */

SEE ALSO
log(1), abl(1), numberAtomExpr(2), profExpr(2), lengthExpr(2), equalExpr(2), equalVarExpr(2), searchExpr(2), searchOperExpr(2).

SUPPORT STATUS
if bugs arise, please e-mail to cao-vlsi@masi.ibp.fr