Read Me - Common Public License V1.0 - Copyright Notice(©)

previous


>>-previous(index)---------------------------------------------><

Returns the index of the item that precedes the array item having index [index] or the Nil object if the item having that index is first in the array. For multi-dimension arrays, the same ordering used by the allitems() () method is used to determine the previous position and the index is returned as an array of index values.

Note that the index argument may also be specified as an array of indexes.

Array class - previous method

a = .array~of("Fred", , "Mike", , "David")
say a~previous(3)  -- says: 1

Read Me - Common Public License V1.0 - Copyright Notice(©)