CMatrix:Get


The Get method returns the value of the CMatrix member at a specified index.

Syntax

value = CMatrix:Get( n, m )

bullet.gif    n is the row index of the member to retrieve.

bullet.gif    m is the column index of the member to retrieve.

bullet.gif    value is the value of the member and may be a number, string, or other Lua value..

bullet.gif    On success, the value is returned.

bullet.gif    On failure, nil is returned.

Remarks

The returned value is whatever type was stored in the matrix at the specified index. If the index is not a valid row and column, this method returns nil.

Example

Assume that a CMatrix named M exists and contains a value "abc" at index [10][5]. This script returns the string:

v = M:Get( 10, 5 )

-- get the value of M[10][5]

Printf("v = '%s'", v )

-- v = 'abc'

Related Topics

CMatrix class, Set

 


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