ch7mon.c 442 B

12345678910111213141516171819202122232425
  1. /* $Id$ */
  2. /*
  3. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. * See the copyright notice in the ACK home directory, in the file "Copyright".
  5. */
  6. /* EVALUATION OF MONADIC OPERATORS */
  7. #include "Lpars.h"
  8. #include <em_arith.h>
  9. ch7mon(oper, pval)
  10. register arith *pval;
  11. {
  12. switch (oper) {
  13. case '~':
  14. *pval = ~(*pval);
  15. break;
  16. case '-':
  17. *pval = -(*pval);
  18. break;
  19. case '!':
  20. *pval = !(*pval);
  21. break;
  22. }
  23. }