Mercurial > hg > octave-lyh
diff src/ov-builtin.cc @ 4059:db58c1a1e6ce
[project @ 2002-09-18 07:21:12 by jwe]
author | jwe |
---|---|
date | Wed, 18 Sep 2002 07:21:12 +0000 |
parents | f9ea3dcf58ee |
children | 6e86256e9c54 |
line wrap: on
line diff
--- a/src/ov-builtin.cc +++ b/src/ov-builtin.cc @@ -76,10 +76,20 @@ panic_impossible (); } - return retval; + // XXX FIXME XXX -- perhaps there should be an + // octave_value_list::next_subsref member function? See also + // octave_user_function::subsref. + // + // XXX FIXME XXX -- Note that if a function call returns multiple + // values, and there is further indexing to perform, then we are + // ignoring all but the first value. Is this really what we want to + // do? If it is not, then what should happen for stat("file").size, + // for exmaple? - // XXX FIXME XXX - // return retval.next_subsref (type, idx); + if (idx.length () > 1) + retval = retval(0).next_subsref (type, idx); + + return retval; } octave_value_list