Mercurial > hg > octave-nkf
diff src/pt-colon.cc @ 5358:cae8081f90f2
[project @ 2005-05-19 23:22:06 by jwe]
author | jwe |
---|---|
date | Thu, 19 May 2005 23:22:06 +0000 |
parents | 679cc8fec408 |
children | 2a6cb4ed8f1e |
line wrap: on
line diff
--- a/src/pt-colon.cc +++ b/src/pt-colon.cc @@ -93,22 +93,15 @@ bool limit_empty = m_limit.is_empty (); bool increment_empty = m_increment.is_empty (); - if ((base_empty || m_base.numel () == 1) - && (limit_empty || m_limit.numel () == 1) - && (increment_empty || m_increment.numel () == 1)) + if (base_empty || limit_empty || increment_empty) + retval = Range (); + else { - if (base_empty || limit_empty || increment_empty) - retval = Range (); - else - { - retval = Range (m_base(0), m_limit(0), m_increment(0)); + retval = Range (m_base(0), m_limit(0), m_increment(0)); - if (result_is_str) - retval = retval.convert_to_str (false, true, dq_str ? '"' : '\''); - } + if (result_is_str) + retval = retval.convert_to_str (false, true, dq_str ? '"' : '\''); } - else - eval_error ("colon expression values must be scalars or empty matrices"); return retval; }