reverse (replaces TReverse)
The reverse function reverses the order of values in a table of numbers. The table can be a 1-dimensional array or a class object of type CImage or CArray.
new_table = reverse( table )
table is a 1-dimensional array or an object of class CImage or CArray.
The reversed 1-dimensional array is returned as new_table.
On failure, nil is returned.
The CImage class supports values ranging from byte to double plus other pixel types.
The following script creates a table of numbers [1,..., 1000] and then reverses the order so the table contains the numbers [1000, ..., 1].
|
-- create a table in reverse order |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.