ack/util/cpp/ch7mon.c

20 lines
243 B
C
Raw Normal View History

1987-01-06 15:16:53 +00:00
/* EVALUATION OF MONADIC OPERATORS */
#include "Lpars.h"
ch7mon(oper, pval)
register int *pval;
{
switch (oper) {
case '~':
*pval = ~(*pval);
break;
case '-':
*pval = -(*pval);
break;
case '!':
*pval = !(*pval);
break;
}
}