Mercurial > octave
diff libinterp/parse-tree/pt-id.cc @ 22898:9baa19102908
refactor display and disp functions (bug #49794)
* pr-output.cc (Fdisp, Ffdisp): Tag with dispatch classes.
(Fdisplay): New function.
* ov-class.cc (octave_class::print_with_name):
Simply call octave_base_value::print_with_name.
* ov-classdef.cc (octave_classdef::print): Simply call print_raw.
(octave_classdef::print_with_name):
Simply call octave_base_value::print_with_name.
* variables.cc (bind_ans): Call display function to print result.
* pt-assign.cc (tree_simple_assignment::rvalue1,
tree_multi_assignment::rvalue): Likewise.
* pt-id.cc (tree_identifier::rvalue): Likewise.
* display.m: Delete.
* scripts/general/module.mk: Update.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 16 Dec 2016 00:10:27 -0500 |
parents | 3a2b891d0b33 |
children | 4e3d47dc7e25 |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-id.cc Thu Dec 15 22:04:11 2016 -0500 +++ b/libinterp/parse-tree/pt-id.cc Fri Dec 16 00:10:27 2016 -0500 @@ -28,6 +28,7 @@ #include "ovl.h" #include "oct-lvalue.h" #include "pager.h" +#include "parse.h" #include "pt-bp.h" #include "pt-const.h" #include "pt-eval.h" @@ -95,7 +96,14 @@ { if (print_result () && nargout == 0 && octave::tree_evaluator::statement_printing_enabled ()) - val.print_with_name (octave_stdout, name ()); + { + octave_value_list args = ovl (val, name ()); + string_vector name_tags (2); + name_tags(0) = name (); + name_tags(1) = "name"; + args.stash_name_tags (name_tags); + feval ("display", args); + } retval = val; }