CMatrixRow:Set


The Set method adds or changes the value of the member at a specified CMatrixRow index.

Syntax

CMatrixRow:Set( nIndex, value )

where

    nIndex is the member index to set, beginning at 1.

    value is the target value to assign to assign.

Example

The following script sets 2 of the CMatrixRow members. Other members, such as index 2, remain undefined:

R = CMatrixRow:new()

-- create a CMatrixRow

R:Set( 4, 10.5 )

-- set the member at index 4

R:Set( 1, 2.5 )

-- set the member at index 1

Printf("R[4] = %lg", R:Get(4) )

-- result: R[4] = 10.5

Printf("R[2] = %lg", R:Get(2) )

-- result: R[2] = 0

Related Topics

Init

CMatrixRow class