diff src/ov-cx-mat.cc @ 5781:faafc2d98b8d

[project @ 2006-05-02 19:40:19 by jwe]
author jwe
date Tue, 02 May 2006 19:40:21 +0000 (2006-05-02)
parents ace8d8d26933
children 22e23bee74c8
line wrap: on
line diff
--- a/src/ov-cx-mat.cc
+++ b/src/ov-cx-mat.cc
@@ -123,15 +123,14 @@
 {
   double retval = lo_ieee_nan_value ();
 
-  if (! force_conversion && Vwarn_imag_to_real)
-    gripe_implicit_conversion ("complex matrix", "real scalar");
+  if (! force_conversion)
+    gripe_implicit_conversion ("Octave:imag-to-real",
+			       "complex matrix", "real scalar");
 
-  // FIXME -- maybe this should be a function, valid_as_scalar()
   if (rows () > 0 && columns () > 0)
     {
-      // FIXME -- is warn_fortran_indexing the right variable here?
-      if (Vwarn_fortran_indexing)
-	gripe_implicit_conversion ("complex matrix", "real scalar");
+      gripe_implicit_conversion ("Octave:array-as-scalar",
+				 "complex matrix", "real scalar");
 
       retval = std::real (matrix (0, 0));
     }
@@ -146,8 +145,9 @@
 {
   Matrix retval;
 
-  if (! force_conversion && Vwarn_imag_to_real)
-    gripe_implicit_conversion ("complex matrix", "real matrix");
+  if (! force_conversion)
+    gripe_implicit_conversion ("Octave:imag-to-real",
+			       "complex matrix", "real matrix");
 
   retval = ::real (matrix.matrix_value ());
 
@@ -161,12 +161,10 @@
 
   Complex retval (tmp, tmp);
 
-  // FIXME -- maybe this should be a function, valid_as_scalar()
   if (rows () > 0 && columns () > 0)
     {
-      // FIXME -- is warn_fortran_indexing the right variable here?
-      if (Vwarn_fortran_indexing)
-	gripe_implicit_conversion ("complex matrix", "complex scalar");
+      gripe_implicit_conversion ("Octave:array-as-scalar",
+				 "complex matrix", "complex scalar");
 
       retval = matrix (0, 0);
     }
@@ -187,8 +185,9 @@
 {
   SparseMatrix retval;
 
-  if (! force_conversion && Vwarn_imag_to_real)
-    gripe_implicit_conversion ("complex matrix", "real matrix");
+  if (! force_conversion)
+    gripe_implicit_conversion ("Octave:imag-to-real",
+			       "complex matrix", "real matrix");
 
   retval = SparseMatrix (::real (matrix.matrix_value ()));