displayExpr(2)

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

NAME
displayExpr - displays an expression in a prefixed notation.

SYNOPSIS
#include "logmmm.h"
void displayExpr(expr)
chain_list *expr;

PARAMETER

expr
    Expression to display.

DESCRIPTION
displayExpr() displays on the screen expr in a prefixed notation.

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);
/* it will display
(OR a b)
*/
freeExpr(expr);

PROGRAM
void displayExpr(expr)
chain_list *expr;
if (ATOM(expr))		/* atomic treatement */
   printf(" %s",VALUE_ATOM(expr));
else
   {			/* go through the arguments */
   printf("(%s",operToChar(OPER(expr)));
   while (expr = CDR(expr))
      displayExpr(CAR(expr));
   printf(")");
   }
}

SEE ALSO
log(1), abl(1), displayInfExpr(2), exprToChar(2), charToOper(2), operToChar(2), identExpr(2).

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