131 @deftypefn {Built-in Function} {} end\n\
132 The magic index @qcode{\"end\"} refers to the last valid entry in an indexing\n\
139 @var{x} = [ 1 2 3 \n\
160 args(1) = index_position + 1;
163 std::string class_name = indexed_object->
class_name ();
174 if (num_indices < ndims)
176 for (
int i = num_indices; i < ndims; i++)
177 dv(num_indices-1) *= dv(i);
179 if (num_indices == 1)
192 if (index_position < ndims)
193 retval = dv(index_position);
198 ::error (
"invalid use of end");
211 && ! (
object->is_function ()
212 ||
object->is_function_handle ()));
220 indexed_object = object;
225 std::list<octave_value_list> args;
228 for (
int k = 0; k < len; k++)
247 ::error (
"evaluating argument list element number %d", k+1);
256 args.push_back (tmp);
269 std::list<octave_lvalue>
272 std::list<octave_lvalue> retval;
280 retval.push_back (elt->
lvalue ());
305 std::list<std::string>
308 std::list<std::string> retval;
318 retval.push_back (id->
name ());
325 retval.push_back (idx_expr->
name ());
345 new_list->
append (elt ? elt->
dup (scope, context) : 0);