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 = ie.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);
void set_var(const std::string &var_arg="")
virtual const char * err_id(void) const =0
octave_value value(void) const
octave_idx_type numel(void) const
void assign(octave_value::assign_op, const octave_value &)
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
OCTINTERP_API octave_value_list list_value(void) const
static OCTINTERP_API std::string assign_op_as_string(assign_op)
bool is_cs_list(void) const
bool is_undefined(void) const
bool statement_printing_enabled(void)
const std::list< octave_lvalue > * lvalue_list(void) const
void set_lvalue_list(const std::list< octave_lvalue > *lst)
std::list< octave_lvalue > make_lvalue_list(tree_argument_list *)
virtual octave_value evaluate(tree_evaluator &tw, int nargout=1)=0
virtual std::string name(void) const
virtual tree_expression * dup(symbol_scope &scope) const =0
bool print_result(void) const
virtual void copy_base(const tree_expression &e)
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)
~tree_multi_assignment(void)
std::string oper(void) const
tree_expression * dup(symbol_scope &scope) const
octave_value_list evaluate_n(tree_evaluator &tw, int nargout=1)
octave_value::assign_op op_type(void) const
tree_argument_list * m_lhs
~tree_simple_assignment(void)
tree_simple_assignment(bool plhs=false, int l=-1, int c=-1, octave_value::assign_op t=octave_value::op_asn_eq)
octave_value::assign_op m_etype
octave_value evaluate(tree_evaluator &tw, int nargout=1)
tree_expression * dup(symbol_scope &scope) const
std::string oper(void) 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(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.