26 #if defined (HAVE_CONFIG_H)
45 bool plhs,
int l,
int c,
48 m_ans_assign (), m_etype (t)
70 m_rhs ? m_rhs->
dup (scope) :
nullptr,
89 std::list<octave_lvalue> lvalue_list;
90 lvalue_list.push_back (ult);
92 unwind_action act ([&tw] (
const std::list<octave_lvalue> *lvl)
98 if (ult.
numel () != 1)
104 error (
"value on right hand side of assignment is undefined");
111 error (
"invalid number of elements on RHS of assignment");
116 ult.
assign (m_etype, rhs_val);
140 interp.
feval (
"display", args);
146 std::string msg = ie.message ();
158 bool plhs,
int l,
int c)
192 unwind_action act ([&tw] (
const std::list<octave_lvalue> *lvl)
200 for (
const auto& lval : lvalue_list)
201 n_out += lval.numel ();
206 && rhs_val1(0).is_cs_list ()
207 ? rhs_val1(0).list_value ()
216 std::list<octave_value_list> retval_list;
218 auto q = m_lhs->
begin ();
246 if (lvalue_list.size () == 1 && nel == 0 &&
n > 0
247 && ! ult.is_black_hole () && ult.index_type () ==
"{"
248 && (ult.index_is_empty ()
249 || (ult.is_defined () && ult.index_is_colon ())))
257 ult.define (
Cell (1, 1));
260 std::list<octave_value_list> idx;
262 ult.set_index (
"{", idx);
266 error (
"some elements undefined in return list");
276 retval_list.push_back (
ovl);
284 if (ult.is_black_hole ())
294 error (
"element number %" OCTAVE_IDX_TYPE_FORMAT
295 " undefined in return list", k+1);
299 retval_list.push_back (tmp);
321 if (! ult.is_black_hole ())
322 error (
"element number %" OCTAVE_IDX_TYPE_FORMAT
323 " undefined in return list", k+1);
346 interp.
feval (
"display", args);
357 OCTAVE_END_NAMESPACE(
octave)
virtual const char * err_id() const =0
void set_var(const std::string &var_arg="")
octave_value_list feval(const char *name, const octave_value_list &args=octave_value_list(), int nargout=0)
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
void assign(octave_value::assign_op, const octave_value &)
octave_idx_type numel() const
octave_value value() const
void stash_name_tags(const string_vector &nm)
octave_value_list slice(octave_idx_type offset, octave_idx_type len, bool tags=false) const
octave_idx_type length() const
octave_value_list list_value() const
bool is_undefined() const
static std::string assign_op_as_string(assign_op)
interpreter & get_interpreter()
const std::list< octave_lvalue > * lvalue_list() const
void set_lvalue_list(const std::list< octave_lvalue > *lst)
std::list< octave_lvalue > make_lvalue_list(tree_argument_list *)
bool statement_printing_enabled()
virtual octave_value evaluate(tree_evaluator &tw, int nargout=1)=0
bool print_result() const
virtual tree_expression * dup(symbol_scope &scope) const =0
virtual void copy_base(const tree_expression &e)
virtual std::string name() const
virtual octave_lvalue lvalue(tree_evaluator &)
virtual octave_value_list evaluate_n(tree_evaluator &tw, int nargout=1)=0
tree_multi_assignment(bool plhs=false, int l=-1, int c=-1)
octave_value::assign_op op_type() const
tree_expression * dup(symbol_scope &scope) const
octave_value_list evaluate_n(tree_evaluator &tw, int nargout=1)
tree_simple_assignment(bool plhs=false, int l=-1, int c=-1, octave_value::assign_op t=octave_value::op_asn_eq)
~tree_simple_assignment()
octave_value evaluate(tree_evaluator &tw, int nargout=1)
tree_expression * dup(symbol_scope &scope) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void error_with_id(const char *id, const char *fmt,...)
void() error(const char *fmt,...)
#define panic_impossible()
void err_invalid_structure_assignment()
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.