diff liboctave/Array-util.cc @ 4669:334a27c8f453

[project @ 2003-11-26 07:02:42 by jwe]
author jwe
date Wed, 26 Nov 2003 07:02:42 +0000
parents bf7272f8ba8c
children 6639c2574023
line wrap: on
line diff
--- a/liboctave/Array-util.cc	Wed Nov 26 04:28:39 2003 +0000
+++ b/liboctave/Array-util.cc	Wed Nov 26 07:02:42 2003 +0000
@@ -25,6 +25,8 @@
 #endif
 
 #include "Array-util.h"
+#include "dim-vector.h"
+#include "lo-error.h"
 
 bool
 index_in_bounds (const Array<int>& ra_idx, const dim_vector& dimensions)
@@ -531,6 +533,35 @@
   return retval;
 }
 
+void
+gripe_nonconformant (const char *op, int op1_len, int op2_len)
+{
+  (*current_liboctave_error_handler)
+    ("%s: nonconformant arguments (op1 len: %d, op2 len: %d)",
+     op, op1_len, op2_len);
+}
+
+void
+gripe_nonconformant (const char *op, int op1_nr, int op1_nc,
+		     int op2_nr, int op2_nc)
+{
+  (*current_liboctave_error_handler)
+    ("%s: nonconformant arguments (op1 is %dx%d, op2 is %dx%d)",
+     op, op1_nr, op1_nc, op2_nr, op2_nc);
+}
+
+void
+gripe_nonconformant (const char *op, dim_vector& op1_dims,
+		     dim_vector& op2_dims)
+{
+  std::string op1_dims_str = op1_dims.str ();
+  std::string op2_dims_str = op2_dims.str ();
+
+  (*current_liboctave_error_handler)
+    ("%s: nonconformant arguments (op1 is %s, op2 is %s)",
+     op, op1_dims_str.c_str (), op2_dims_str.c_str ());
+}
+
 /*
 ;;; Local Variables: ***
 ;;; mode: C++ ***