26 #if defined (HAVE_CONFIG_H)
45 bool plhs,
int l,
int c,
48 m_ans_assign (), m_etype (t)
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");
137 feval (
"display", args);
143 std::string msg = e.message ();
155 bool plhs,
int l,
int c)
189 unwind_action act ([&tw] (
const std::list<octave_lvalue> *lvl)
197 for (
const auto& lval : lvalue_list)
198 n_out += lval.numel ();
203 && rhs_val1(0).is_cs_list ()
204 ? rhs_val1(0).list_value ()
215 std::list<octave_value_list> retval_list;
245 if (lvalue_list.size () == 1 && nel == 0 &&
n > 0
246 && ! ult.is_black_hole () && ult.index_type () ==
"{"
247 && (ult.index_is_empty ()
248 || (ult.is_defined () && ult.index_is_colon ())))
256 ult.define (
Cell (1, 1));
259 std::list<octave_value_list> idx;
261 ult.set_index (
"{", idx);
265 error (
"some elements undefined in return list");
275 retval_list.push_back (
ovl);
283 if (ult.is_black_hole ())
293 error (
"element number %" OCTAVE_IDX_TYPE_FORMAT
294 " undefined in return list", k+1);
298 retval_list.push_back (tmp);
320 if (! ult.is_black_hole ())
321 error (
"element number %" OCTAVE_IDX_TYPE_FORMAT
322 " undefined in return list", k+1);
342 feval (
"display", args);
virtual const char * err_id(void) const =0
void set_var(const std::string &var_arg="")
void assign(octave_value::assign_op, const octave_value &)
octave_value value(void) const
octave_idx_type numel(void) const
void set_lvalue_list(const std::list< octave_lvalue > *lst)
const std::list< octave_lvalue > * lvalue_list(void) const
std::list< octave_lvalue > make_lvalue_list(tree_argument_list *)
bool statement_printing_enabled(void)
virtual void copy_base(const tree_expression &e)
virtual tree_expression * dup(symbol_scope &scope) const =0
virtual octave_value_list evaluate_n(tree_evaluator &tw, int nargout=1)=0
virtual octave_lvalue lvalue(tree_evaluator &)
virtual std::string name(void) const
virtual octave_value evaluate(tree_evaluator &tw, int nargout=1)=0
bool print_result(void) const
std::string oper(void) const
octave_value_list evaluate_n(tree_evaluator &tw, int nargout=1)
octave_value::assign_op op_type(void) const
tree_expression * dup(symbol_scope &scope) const
~tree_multi_assignment(void)
tree_multi_assignment(bool plhs=false, int l=-1, int c=-1)
tree_argument_list * m_lhs
octave_value::assign_op m_etype
octave_value evaluate(tree_evaluator &tw, int nargout=1)
std::string oper(void) const
tree_simple_assignment(bool plhs=false, int l=-1, int c=-1, octave_value::assign_op t=octave_value::op_asn_eq)
tree_expression * dup(symbol_scope &scope) const
~tree_simple_assignment(void)
void stash_name_tags(const string_vector &nm)
octave_idx_type length(void) const
octave_value_list slice(octave_idx_type offset, octave_idx_type len, bool tags=false) const
static std::string assign_op_as_string(assign_op)
bool is_cs_list(void) const
octave_value_list list_value(void) const
bool is_undefined(void) const
void error_with_id(const char *id, const char *fmt,...)
void error(const char *fmt,...)
#define panic_impossible()
void err_invalid_structure_assignment(void)
octave_value_list feval(const char *name, const octave_value_list &args, int nargout)
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.