Mercurial > hg > octave-nkf
comparison liboctave/Array.cc @ 5039:8fa98abef34a
[project @ 2004-09-24 23:43:18 by jwe]
author | jwe |
---|---|
date | Fri, 24 Sep 2004 23:43:18 +0000 |
parents | 585e9a8c2ef8 |
children | 36f954d8d53a |
comparison
equal
deleted
inserted
replaced
5038:fdfce0dec36b | 5039:8fa98abef34a |
---|---|
2640 } | 2640 } |
2641 } | 2641 } |
2642 else if (n == 0 && m == 0) | 2642 else if (n == 0 && m == 0) |
2643 { | 2643 { |
2644 if (! ((rhs_nr == 1 && rhs_nc == 1) | 2644 if (! ((rhs_nr == 1 && rhs_nc == 1) |
2645 || (rhs_nr == 0 && rhs_nc == 0))) | 2645 || (rhs_nr == 0 || rhs_nc == 0))) |
2646 { | 2646 { |
2647 (*current_liboctave_error_handler) | 2647 (*current_liboctave_error_handler) |
2648 ("A([], []) = X: X must be an empty matrix or a scalar"); | 2648 ("A([], []) = X: X must be an empty matrix or a scalar"); |
2649 | 2649 |
2650 retval = 0; | 2650 retval = 0; |
2778 if (rhs_nr == 0 && rhs_nc == 0) | 2778 if (rhs_nr == 0 && rhs_nc == 0) |
2779 lhs.maybe_delete_elements (idx_i); | 2779 lhs.maybe_delete_elements (idx_i); |
2780 else if (len == 0) | 2780 else if (len == 0) |
2781 { | 2781 { |
2782 if (! ((rhs_nr == 1 && rhs_nc == 1) | 2782 if (! ((rhs_nr == 1 && rhs_nc == 1) |
2783 || (rhs_nr == 0 && rhs_nc == 0))) | 2783 || (rhs_nr == 0 || rhs_nc == 0))) |
2784 (*current_liboctave_error_handler) | 2784 (*current_liboctave_error_handler) |
2785 ("A([]) = X: X must be an empty matrix or scalar"); | 2785 ("A([]) = X: X must be an empty matrix or scalar"); |
2786 } | 2786 } |
2787 else if (len == rhs_nr * rhs_nc) | 2787 else if (len == rhs_nr * rhs_nc) |
2788 { | 2788 { |
2871 | 2871 |
2872 if (iidx) | 2872 if (iidx) |
2873 { | 2873 { |
2874 if (len == 0) | 2874 if (len == 0) |
2875 { | 2875 { |
2876 if (! (rhs_dims.all_ones () || rhs_dims.all_zero ())) | 2876 if (! (rhs_dims.all_ones () || rhs_dims.any_zero ())) |
2877 { | 2877 { |
2878 (*current_liboctave_error_handler) | 2878 (*current_liboctave_error_handler) |
2879 ("A([]) = X: X must be an empty matrix or scalar"); | 2879 ("A([]) = X: X must be an empty matrix or scalar"); |
2880 | 2880 |
2881 retval = 0; | 2881 retval = 0; |