CHANGEOPEREXPR(3)

NAME
changeOperExpr - changes the operator of the head of an expression.

SYNOPSYS
#include "logmmm.h"
void changeOperExpr(expr,oper)
chain_list *expr;
short oper;

PARAMETERS

expr
    expression

oper
    the new operator of the expression

DESCRIPTION
changeOperExpr() changes the operator of the head of expr with oper.

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

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