Mercurial > hg > octave-nkf
diff src/ov-list.cc @ 4461:af308ca1a354
[project @ 2003-07-11 22:21:17 by jwe]
author | jwe |
---|---|
date | Fri, 11 Jul 2003 22:21:18 +0000 |
parents | fc9a075d10fb |
children | 508238e65af7 |
line wrap: on
line diff
--- a/src/ov-list.cc +++ b/src/ov-list.cc @@ -201,8 +201,13 @@ { int n = lst.length (); - if (i > 0 && (Vresize_on_range_error || i <= n)) - lst(i-1) = rhs; + if (i > 0) + { + if (Vwarn_resize_on_range_error && i > n) + warning ("list index = %d out of range", i); + + lst(i-1) = rhs; + } else error ("list index = %d out of range", i); }