2825
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
2825
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
20 |
|
21 */ |
|
22 |
|
23 #if defined (__GNUG__) |
|
24 #pragma implementation |
|
25 #endif |
|
26 |
|
27 #ifdef HAVE_CONFIG_H |
|
28 #include <config.h> |
|
29 #endif |
|
30 |
|
31 #include "gripes.h" |
|
32 #include "ov.h" |
|
33 #include "ov-bool.h" |
|
34 #include "ov-typeinfo.h" |
|
35 #include "op-b-b.h" |
|
36 #include "ops.h" |
|
37 #include "xdiv.h" |
|
38 #include "xpow.h" |
|
39 |
|
40 // bool by bool ops. |
|
41 |
|
42 static octave_value |
|
43 eq (const octave_value& a1, const octave_value& a2) |
|
44 { |
|
45 CAST_BINOP_ARGS (const octave_bool&, const octave_bool&); |
|
46 |
|
47 return octave_value (v1.bool_value () == v2.bool_value ()); |
|
48 } |
|
49 |
|
50 static octave_value |
|
51 ne (const octave_value& a1, const octave_value& a2) |
|
52 { |
|
53 CAST_BINOP_ARGS (const octave_bool&, const octave_bool&); |
|
54 |
|
55 return octave_value (v1.bool_value () != v2.bool_value ()); |
|
56 } |
|
57 |
|
58 void |
|
59 install_b_b_ops (void) |
|
60 { |
|
61 INSTALL_BINOP (eq, octave_bool, octave_bool, eq); |
|
62 INSTALL_BINOP (ne, octave_bool, octave_bool, ne); |
|
63 } |
|
64 |
|
65 /* |
|
66 ;;; Local Variables: *** |
|
67 ;;; mode: C++ *** |
|
68 ;;; End: *** |
|
69 */ |