Initial revision
This commit is contained in:
19
util/cpp/ch7mon.c
Normal file
19
util/cpp/ch7mon.c
Normal file
@@ -0,0 +1,19 @@
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user