comparison src/ov.cc @ 5775:ace8d8d26933

[project @ 2006-04-24 19:13:06 by jwe]
author jwe
date Mon, 24 Apr 2006 19:13:11 +0000
parents ce79d238f142
children faafc2d98b8d
comparison
equal deleted inserted replaced
5774:e7af222e98b0 5775:ace8d8d26933
90 bool Vwarn_fortran_indexing; 90 bool Vwarn_fortran_indexing;
91 91
92 // Should we warn about conversions from complex to real? 92 // Should we warn about conversions from complex to real?
93 int Vwarn_imag_to_real; 93 int Vwarn_imag_to_real;
94 94
95 // XXX FIXME XXX 95 // FIXME
96 96
97 // Octave's value type. 97 // Octave's value type.
98 98
99 std::string 99 std::string
100 octave_value::unary_op_as_string (unary_op op) 100 octave_value::unary_op_as_string (unary_op op)
827 827
828 octave_value t_rhs = rhs; 828 octave_value t_rhs = rhs;
829 829
830 if (op != op_asn_eq) 830 if (op != op_asn_eq)
831 { 831 {
832 // XXX FIXME XXX -- only do the following stuff if we can't find 832 // FIXME -- only do the following stuff if we can't find
833 // a specific function to call to handle the op= operation for 833 // a specific function to call to handle the op= operation for
834 // the types we have. 834 // the types we have.
835 835
836 octave_value t; 836 octave_value t;
837 if (is_constant ()) 837 if (is_constant ())
875 { 875 {
876 if (op == op_asn_eq) 876 if (op == op_asn_eq)
877 operator = (rhs); 877 operator = (rhs);
878 else 878 else
879 { 879 {
880 // XXX FIXME XXX -- only do the following stuff if we can't find 880 // FIXME -- only do the following stuff if we can't find
881 // a specific function to call to handle the op= operation for 881 // a specific function to call to handle the op= operation for
882 // the types we have. 882 // the types we have.
883 883
884 binary_op binop = op_eq_to_binary_op (op); 884 binary_op binop = op_eq_to_binary_op (op);
885 885
1140 for (octave_idx_type i = 0; i < nr; i++) 1140 for (octave_idx_type i = 0; i < nr; i++)
1141 retval (i) = m (i, 0); 1141 retval (i) = m (i, 0);
1142 } 1142 }
1143 else if (nr > 0 && nc > 0) 1143 else if (nr > 0 && nc > 0)
1144 { 1144 {
1145 // XXX FIXME XXX -- is warn_fortran_indexing the right variable here? 1145 // FIXME -- is warn_fortran_indexing the right variable here?
1146 if (! force_vector_conversion && Vwarn_fortran_indexing) 1146 if (! force_vector_conversion && Vwarn_fortran_indexing)
1147 gripe_implicit_conversion (type_name (), "real vector"); 1147 gripe_implicit_conversion (type_name (), "real vector");
1148 1148
1149 retval.resize (nr * nc); 1149 retval.resize (nr * nc);
1150 octave_idx_type k = 0; 1150 octave_idx_type k = 0;
1215 retval (i) = static_cast<int> (d); 1215 retval (i) = static_cast<int> (d);
1216 } 1216 }
1217 } 1217 }
1218 else if (nr > 0 && nc > 0) 1218 else if (nr > 0 && nc > 0)
1219 { 1219 {
1220 // XXX FIXME XXX -- is warn_fortran_indexing the right variable here? 1220 // FIXME -- is warn_fortran_indexing the right variable here?
1221 if (! force_vector_conversion && Vwarn_fortran_indexing) 1221 if (! force_vector_conversion && Vwarn_fortran_indexing)
1222 gripe_implicit_conversion (type_name (), "real vector"); 1222 gripe_implicit_conversion (type_name (), "real vector");
1223 1223
1224 retval.resize (nr * nc); 1224 retval.resize (nr * nc);
1225 octave_idx_type k = 0; 1225 octave_idx_type k = 0;
1282 retval (i) = m (i, 0); 1282 retval (i) = m (i, 0);
1283 } 1283 }
1284 } 1284 }
1285 else if (nr > 0 && nc > 0) 1285 else if (nr > 0 && nc > 0)
1286 { 1286 {
1287 // XXX FIXME XXX -- is warn_fortran_indexing the right variable here? 1287 // FIXME -- is warn_fortran_indexing the right variable here?
1288 if (! force_vector_conversion && Vwarn_fortran_indexing) 1288 if (! force_vector_conversion && Vwarn_fortran_indexing)
1289 gripe_implicit_conversion (type_name (), "complex vector"); 1289 gripe_implicit_conversion (type_name (), "complex vector");
1290 1290
1291 retval.resize (nr * nc); 1291 retval.resize (nr * nc);
1292 octave_idx_type k = 0; 1292 octave_idx_type k = 0;
1667 1667
1668 retval = *this; 1668 retval = *this;
1669 } 1669 }
1670 else 1670 else
1671 { 1671 {
1672 // XXX FIXME XXX -- only do the following stuff if we can't find a 1672 // FIXME -- only do the following stuff if we can't find a
1673 // specific function to call to handle the op= operation for the 1673 // specific function to call to handle the op= operation for the
1674 // types we have. 1674 // types we have.
1675 1675
1676 assign_op assop = unary_op_to_assign_op (op); 1676 assign_op assop = unary_op_to_assign_op (op);
1677 1677