ack/util/cpp/ch7mon.c

26 lines
442 B
C
Raw Normal View History

1994-06-24 11:31:16 +00:00
/* $Id$ */
1987-03-09 19:15:41 +00:00
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
1987-01-06 15:16:53 +00:00
/* EVALUATION OF MONADIC OPERATORS */
#include "Lpars.h"
#include <em_arith.h>
1987-01-06 15:16:53 +00:00
ch7mon(oper, pval)
register arith *pval;
1987-01-06 15:16:53 +00:00
{
switch (oper) {
case '~':
*pval = ~(*pval);
break;
case '-':
*pval = -(*pval);
break;
case '!':
*pval = !(*pval);
break;
}
}