random sdev

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.

Syntax

new_table = reverse( table )

bullet.gif    table is a 1-dimensional array or an object of class CImage or CArray.

bullet.gif    The reversed 1-dimensional array is returned as new_table.

bullet.gif    On failure, nil is returned.

Remarks

The CImage class supports values ranging from byte to double plus other pixel types.

Example

The following script creates a table of numbers [1,..., 1000] and then reverses the order so the table contains the numbers [1000, ..., 1].

t = reverse( series( 1000 ) )

-- create a table in reverse order

  

Related Topics

Table and Array Functions

sort

series

 


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.