diff src/OPERATORS/op-s-s.cc @ 3203:bc61b0e8d60e

[project @ 1998-10-30 20:26:27 by jwe]
author jwe
date Fri, 30 Oct 1998 20:26:31 +0000
parents 295f037b4b3e
children 0ff7323dab8b
line wrap: on
line diff
--- a/src/OPERATORS/op-s-s.cc	Thu Oct 29 20:28:02 1998 +0000
+++ b/src/OPERATORS/op-s-s.cc	Fri Oct 30 20:26:31 1998 +0000
@@ -37,6 +37,16 @@
 #include "xdiv.h"
 #include "xpow.h"
 
+// scalar unary ops.
+
+DEFUNOP_OP (not, scalar, !)
+DEFUNOP_OP (uminus, scalar, -)
+DEFUNOP_OP (transpose, scalar, /* no-op */)
+DEFUNOP_OP (hermitian, scalar, /* no-op */)
+
+DEFNCUNOP_METHOD (incr, scalar, increment)
+DEFNCUNOP_METHOD (decr, scalar, decrement)
+
 // scalar by scalar ops.
 
 DEFBINOP_OP (add, scalar, scalar, +)
@@ -132,6 +142,14 @@
 void
 install_s_s_ops (void)
 {
+  INSTALL_UNOP (not, octave_scalar, not);
+  INSTALL_UNOP (uminus, octave_scalar, uminus);
+  INSTALL_UNOP (transpose, octave_scalar, transpose);
+  INSTALL_UNOP (hermitian, octave_scalar, hermitian);
+
+  INSTALL_NCUNOP (incr, octave_scalar, incr);
+  INSTALL_NCUNOP (decr, octave_scalar, decr);
+
   INSTALL_BINOP (add, octave_scalar, octave_scalar, add);
   INSTALL_BINOP (sub, octave_scalar, octave_scalar, sub);
   INSTALL_BINOP (mul, octave_scalar, octave_scalar, mul);