[row]

Syntax

<Path>[Row:integer]

The method [row] returns the value of the designated row of the DataList designated by <Path>. You can also assign a new value to the cell in the row.

Note:

When reading the contents of a cell of a DataList with the bracket operator in SimTalk 2.0, Plant Simulation reads the contents of the designated cell, but will leave it in the DataStack, DataQueue, and the DataList. When assigning a value to the designated cell with the bracket operator in SimTalk 2.0, this value will just overwrite the contents of the existing cell. This way a DataList will behave the same way as a DataTable with one column.

Note:

When reading the contents of a cell of a DataList with the bracket operator in SimTalk 1.0, Plant Simulation reads and removes the contents of the designated cell. The remaining cells move up by one position. When assigning a value to the designated cell with the bracket operator in SimTalk 1.0, Plant Simulation inserts this value into the cell and moves the existing cells down by one position.

Parameter

The parameter Row of data type integer designates the position of the cell.

Example

print DataList[2] -- prints the contents of row 2
DataList[2] := 42 -- overwrites the cell in row 2 with the value 42