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

[project @ 2006-05-02 19:40:19 by jwe]
author jwe
date Tue, 02 May 2006 19:40:21 +0000
parents ace8d8d26933
children 22e23bee74c8
line wrap: on
line diff
--- a/src/ov-cx-sparse.cc	Thu Apr 27 20:03:48 2006 +0000
+++ b/src/ov-cx-sparse.cc	Tue May 02 19:40:21 2006 +0000
@@ -119,15 +119,15 @@
 {
   double retval = lo_ieee_nan_value ();
 
-  if (! force_conversion && Vwarn_imag_to_real)
-    gripe_implicit_conversion ("complex sparse matrix", "real scalar");
+  if (! force_conversion)
+    gripe_implicit_conversion ("Octave:imag-to-real",
+			       "complex sparse matrix", "real scalar");
 
   // FIXME -- maybe this should be a function, valid_as_scalar()
   if (numel () > 0)
     {
-      // FIXME -- is warn_fortran_indexing the right variable here?
-      if (Vwarn_fortran_indexing)
-	gripe_implicit_conversion ("complex sparse matrix", "real scalar");
+      gripe_implicit_conversion ("Octave:array-as-scalar",
+				 "complex sparse matrix", "real scalar");
 
       retval = std::real (matrix (0, 0));
     }
@@ -142,8 +142,9 @@
 {
   Matrix retval;
 
-  if (! force_conversion && Vwarn_imag_to_real)
-    gripe_implicit_conversion ("complex sparse matrix", "real matrix");
+  if (! force_conversion)
+    gripe_implicit_conversion ("Octave:imag-to-real",
+			       "complex sparse matrix", "real matrix");
 
   retval = ::real (matrix.matrix_value ());
 
@@ -160,9 +161,8 @@
   // FIXME -- maybe this should be a function, valid_as_scalar()
   if (numel () > 0)
     {
-      // FIXME -- is warn_fortran_indexing the right variable here?
-      if (Vwarn_fortran_indexing)
-	gripe_implicit_conversion ("complex sparse matrix", "real scalar");
+      gripe_implicit_conversion ("Octave:array-as-scalar",
+				 "complex sparse matrix", "real scalar");
 
       retval = matrix (0, 0);
     }
@@ -189,8 +189,9 @@
 {
   SparseMatrix retval;
 
-  if (! force_conversion && Vwarn_imag_to_real)
-    gripe_implicit_conversion ("complex sparse matrix", 
+  if (! force_conversion)
+    gripe_implicit_conversion ("Octave:imag-to-real",
+			       "complex sparse matrix", 
 			       "real sparse matrix");
 
   retval = ::real (matrix);