Mercurial > hg > octave-lojdl
diff src/ov-usr-fcn.cc @ 3933:f9ea3dcf58ee
[project @ 2002-05-15 03:21:00 by jwe]
author | jwe |
---|---|
date | Wed, 15 May 2002 03:21:01 +0000 |
parents | a134e5cfdc01 |
children | e2290bf911f0 |
line wrap: on
line diff
--- a/src/ov-usr-fcn.cc +++ b/src/ov-usr-fcn.cc @@ -257,6 +257,37 @@ } octave_value_list +octave_user_function::subsref (const std::string type, + const SLList<octave_value_list>& idx, + int nargout) +{ + octave_value_list retval; + + switch (type[0]) + { + case '(': + retval = do_multi_index_op (nargout, idx.front ()); + break; + + case '{': + case '.': + { + std::string nm = type_name (); + error ("%s cannot be indexed with %c", nm.c_str (), type[0]); + } + break; + + default: + panic_impossible (); + } + + return retval; + + // XXX FIXME XXX + // return retval.next_subsref (type, idx); +} + +octave_value_list octave_user_function::do_multi_index_op (int nargout, const octave_value_list& args) { @@ -450,6 +481,15 @@ } void +octave_user_function::print_symtab_info (std::ostream& os) const +{ + if (sym_tab) + sym_tab->print_info (os); + else + warning ("%s: no symbol table info!", fcn_name.c_str ()); +} + +void octave_user_function::print_code_function_header (void) { tree_print_code tpc (octave_stdout, Vps4);