23 #if ! defined (octave_pt_eval_h) 24 #define octave_pt_eval_h 1 26 #include "octave-config.h" 44 class tree_expression;
99 return m_stack.top ();
104 return m_stack.size ();
109 return m_stack.empty ();
114 while (! m_stack.empty ())
127 m_expr_result_value (), m_expr_result_value_list (),
128 m_lvalue_list_stack (), m_nargout_stack (),
129 m_call_stack (interp), m_profiler (),
130 m_max_recursion_depth (256), m_silent_functions (
false),
131 m_string_fill_char (
' '), m_PS4 (
"+ "), m_echo (ECHO_OFF),
132 m_echo_state (
false), m_echo_file_name (), m_echo_file_pos (1),
239 bool statement_printing_enabled (
void);
241 static void reset_debug_state (
void);
270 Matrix ignored_fcn_outputs (
void)
const;
272 bool isargout (
int nargout,
int iout)
const;
274 void isargout (
int nargout,
int nout,
bool *isargout)
const;
278 return (m_lvalue_list_stack.empty ()
279 ? nullptr : m_lvalue_list_stack.top ());
285 m_expr_result_value =
val;
291 m_expr_result_value_list = vals;
298 m_nargout_stack.push (
nargout);
302 m_nargout_stack.pop ();
304 switch (m_result_type)
311 retval = m_expr_result_value;
316 retval = (m_expr_result_value_list.empty ()
329 m_nargout_stack.push (
nargout);
333 m_nargout_stack.pop ();
335 switch (m_result_type)
347 retval = m_expr_result_value_list;
357 void define_parameter_list_from_arg_vector
363 convert_return_list_to_const_vector
381 int val = m_max_recursion_depth;
382 m_max_recursion_depth = n;
393 int val = m_silent_functions;
394 m_silent_functions =
b;
405 int val = m_string_fill_char;
406 m_string_fill_char =
c;
423 int echo (
void)
const {
return m_echo; }
427 int old_val = m_echo;
440 void set_echo_state (
int type,
const std::string& file_name,
size_t pos);
442 void maybe_set_echo_state (
void);
446 bool maybe_push_echo_state_cleanup (
void);
450 void do_breakpoint (
bool is_breakpoint,
451 bool is_end_of_fcn_or_script =
false)
const;
471 m_echo_file_name = file_name;
477 m_echo_file_pos = file_pos;
482 void echo_code (
size_t line);
533 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS) 535 OCTAVE_DEPRECATED (4.4,
"use 'octave::tree_evaluator' instead")
536 typedef
octave::tree_evaluator tree_evaluator;
void push_result(const octave_value_list &vals)
std::string PS4(void) const
For example cd octave end example noindent changes the current working directory to file
The value of lines which begin with a space character are not saved in the history list A value of all commands are saved on the history list
tree_evaluator(interpreter &interp)
void set_echo_file_pos(const size_t &file_pos)
identity matrix If supplied two scalar respectively For allows like xample val
static bool in_loop_command
interpreter & m_interpreter
value_stack< const std::list< octave_lvalue > * > m_lvalue_list_stack
void push_result(const octave_value &val)
std::string PS4(const std::string &s)
virtual void accept(tree_walker &tw)=0
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
octave_value_list evaluate_n(tree_expression *expr, int nargout=1)
static bool quiet_breakpoint_flag
bool silent_functions(bool b)
std::string m_echo_file_name
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function xample nargout(@histc)
static size_t current_frame
call_stack & get_call_stack(void)
std::map< std::string, bool > m_echo_files
#define panic_impossible()
void set_echo_file_name(const std::string &file_name)
octave_value m_expr_result_value
OCTINTERP_API void bind_ans(const octave_value &val, bool print)
const std::list< octave_lvalue > * lvalue_list(void) const
int m_max_recursion_depth
int max_recursion_depth(void) const
octave::unwind_protect frame
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return ovl(args(0).isinteger())
result_type m_result_type
static octave_value_list make_value_list(octave::tree_evaluator *tw, octave::tree_argument_list *m_args, const string_vector &m_arg_nm, const octave_value *object, bool rvalue=true)
octave_value_list m_expr_result_value_list
char string_fill_char(void) const
octave_value evaluate(tree_expression *expr, int nargout=1)
value_stack< int > m_nargout_stack
static stmt_list_type statement_context
int max_recursion_depth(int n)
char string_fill_char(char c)
bool silent_functions(void) const
profiler & get_profiler(void)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
void set_echo_state(bool val)