Now that the array class supports a single-dimension object as an index for multidimensional arrays, the method "last" should support that feature as well.
An implementation to support this feature may look like (tested):
---------------- cut here ---------------
::method last -- single & multidimensional last
d=self~dimension -- get number of dimensions
if d=0 then return .nil -- no dimension yet (result of ".array~new")
if d=1 then return dimension(1)-- return size of single dimension
a=.array~new -- create & return array object
do i=1 to d -- set each index to its dimension's size
a~append(self~dimension(i)) -- use size of dimension in hand
end
return a
---------------- cut here ---------------
Anonymous
Logged In: YES
user_id=1125291
Originator: NO
Committed revision 411.
Logged In: YES
user_id=1125291
Originator: NO
Remove the restriction about LAST only working on single-dimension arrays.