Mercurial > hg > octave-nkf
comparison libinterp/octave-value/ov.cc @ 15467:049e8bbff782
maint: periodic merge of stable to default
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 01 Oct 2012 18:30:44 -0400 |
parents | src/ov.cc@d174210ce1ec src/ov.cc@4db96357fec9 |
children | 6ea536cb7360 bf77f7f66bdf |
comparison
equal
deleted
inserted
replaced
15465:ded4ce76ee7a | 15467:049e8bbff782 |
---|---|
1341 #if 0 | 1341 #if 0 |
1342 static void | 1342 static void |
1343 gripe_assign_failed (const std::string& on, const std::string& tn1, | 1343 gripe_assign_failed (const std::string& on, const std::string& tn1, |
1344 const std::string& tn2) | 1344 const std::string& tn2) |
1345 { | 1345 { |
1346 error ("assignment failed for `%s %s %s'", | 1346 error ("assignment failed for '%s %s %s'", |
1347 tn1.c_str (), on.c_str (), tn2.c_str ()); | 1347 tn1.c_str (), on.c_str (), tn2.c_str ()); |
1348 } | 1348 } |
1349 #endif | 1349 #endif |
1350 | 1350 |
1351 static void | 1351 static void |
1352 gripe_assign_failed_or_no_method (const std::string& on, | 1352 gripe_assign_failed_or_no_method (const std::string& on, |
1353 const std::string& tn1, | 1353 const std::string& tn1, |
1354 const std::string& tn2) | 1354 const std::string& tn2) |
1355 { | 1355 { |
1356 error ("assignment failed, or no method for `%s %s %s'", | 1356 error ("assignment failed, or no method for '%s %s %s'", |
1357 tn1.c_str (), on.c_str (), tn2.c_str ()); | 1357 tn1.c_str (), on.c_str (), tn2.c_str ()); |
1358 } | 1358 } |
1359 | 1359 |
1360 octave_value | 1360 octave_value |
1361 octave_value::subsasgn (const std::string& type, | 1361 octave_value::subsasgn (const std::string& type, |
1909 | 1909 |
1910 static void | 1910 static void |
1911 gripe_binary_op (const std::string& on, const std::string& tn1, | 1911 gripe_binary_op (const std::string& on, const std::string& tn1, |
1912 const std::string& tn2) | 1912 const std::string& tn2) |
1913 { | 1913 { |
1914 error ("binary operator `%s' not implemented for `%s' by `%s' operations", | 1914 error ("binary operator '%s' not implemented for '%s' by '%s' operations", |
1915 on.c_str (), tn1.c_str (), tn2.c_str ()); | 1915 on.c_str (), tn1.c_str (), tn2.c_str ()); |
1916 } | 1916 } |
1917 | 1917 |
1918 static void | 1918 static void |
1919 gripe_binary_op_conv (const std::string& on) | 1919 gripe_binary_op_conv (const std::string& on) |
1920 { | 1920 { |
1921 error ("type conversion failed for binary operator `%s'", on.c_str ()); | 1921 error ("type conversion failed for binary operator '%s'", on.c_str ()); |
1922 } | 1922 } |
1923 | 1923 |
1924 octave_value | 1924 octave_value |
1925 do_binary_op (octave_value::binary_op op, | 1925 do_binary_op (octave_value::binary_op op, |
1926 const octave_value& v1, const octave_value& v2) | 1926 const octave_value& v1, const octave_value& v2) |
2221 } | 2221 } |
2222 | 2222 |
2223 static void | 2223 static void |
2224 gripe_cat_op (const std::string& tn1, const std::string& tn2) | 2224 gripe_cat_op (const std::string& tn1, const std::string& tn2) |
2225 { | 2225 { |
2226 error ("concatenation operator not implemented for `%s' by `%s' operations", | 2226 error ("concatenation operator not implemented for '%s' by '%s' operations", |
2227 tn1.c_str (), tn2.c_str ()); | 2227 tn1.c_str (), tn2.c_str ()); |
2228 } | 2228 } |
2229 | 2229 |
2230 static void | 2230 static void |
2231 gripe_cat_op_conv (void) | 2231 gripe_cat_op_conv (void) |
2333 } | 2333 } |
2334 | 2334 |
2335 static void | 2335 static void |
2336 gripe_unary_op (const std::string& on, const std::string& tn) | 2336 gripe_unary_op (const std::string& on, const std::string& tn) |
2337 { | 2337 { |
2338 error ("unary operator `%s' not implemented for `%s' operands", | 2338 error ("unary operator '%s' not implemented for '%s' operands", |
2339 on.c_str (), tn.c_str ()); | 2339 on.c_str (), tn.c_str ()); |
2340 } | 2340 } |
2341 | 2341 |
2342 static void | 2342 static void |
2343 gripe_unary_op_conv (const std::string& on) | 2343 gripe_unary_op_conv (const std::string& on) |
2344 { | 2344 { |
2345 error ("type conversion failed for unary operator `%s'", on.c_str ()); | 2345 error ("type conversion failed for unary operator '%s'", on.c_str ()); |
2346 } | 2346 } |
2347 | 2347 |
2348 octave_value | 2348 octave_value |
2349 do_unary_op (octave_value::unary_op op, const octave_value& v) | 2349 do_unary_op (octave_value::unary_op op, const octave_value& v) |
2350 { | 2350 { |
2420 | 2420 |
2421 static void | 2421 static void |
2422 gripe_unary_op_conversion_failed (const std::string& op, | 2422 gripe_unary_op_conversion_failed (const std::string& op, |
2423 const std::string& tn) | 2423 const std::string& tn) |
2424 { | 2424 { |
2425 error ("operator %s: type conversion for `%s' failed", | 2425 error ("operator %s: type conversion for '%s' failed", |
2426 op.c_str (), tn.c_str ()); | 2426 op.c_str (), tn.c_str ()); |
2427 } | 2427 } |
2428 | 2428 |
2429 octave_value& | 2429 octave_value& |
2430 octave_value::do_non_const_unary_op (unary_op op) | 2430 octave_value::do_non_const_unary_op (unary_op op) |
2812 type_string[k] = '('; | 2812 type_string[k] = '('; |
2813 else if (item == ".") | 2813 else if (item == ".") |
2814 type_string[k] = '.'; | 2814 type_string[k] = '.'; |
2815 else | 2815 else |
2816 { | 2816 { |
2817 error ("%s: invalid indexing type `%s'", name, item.c_str ()); | 2817 error ("%s: invalid indexing type '%s'", name, item.c_str ()); |
2818 return; | 2818 return; |
2819 } | 2819 } |
2820 } | 2820 } |
2821 else | 2821 else |
2822 { | 2822 { |
2851 | 2851 |
2852 idx.push_back (idx_item); | 2852 idx.push_back (idx_item); |
2853 } | 2853 } |
2854 } | 2854 } |
2855 else | 2855 else |
2856 error ("%s: second argument must be a structure with fields `type' and `subs'", name); | 2856 error ("%s: second argument must be a structure with fields 'type' and 'subs'", name); |
2857 } | 2857 } |
2858 | 2858 |
2859 DEFUN (subsref, args, nargout, | 2859 DEFUN (subsref, args, nargout, |
2860 "-*- texinfo -*-\n\ | 2860 "-*- texinfo -*-\n\ |
2861 @deftypefn {Built-in Function} {} subsref (@var{val}, @var{idx})\n\ | 2861 @deftypefn {Built-in Function} {} subsref (@var{val}, @var{idx})\n\ |