Object PmArray (Array of values)

Object represents an array of values. This object is used in scripts written in JavaScript language.
Properties and methods:
Array1 Sets and fills onedimensional array with values
Create Creates a 1- or 2-dimensional array
GetDim The array size
GetItem Returns the array item
GetSize Returns the array size in defined dimension
SetItem Sets the value in the item
LoadFromVbArray Fills in PmArray by copying from the VBScript array
SaveToVbArray Returns a copy of PmArray array as VBScript array
- The object can be created by the method Pm.CreatePmArray.
- This object is functional also for Web panels. It is not functional in InternetExplorer8 and lower.
In PROMOTIC JavaScript panels it is not possible to use the standard arrays of the VBScript and JavaScript languages (see Language data types). In these panels, all methods and properties use the PROMOTIC PmArray - see How to use array of values in the PROMOTIC system.
Comparison of objects used for data storage:

The following object types can be used for holding values (of any data type). Each of these objects has certain advantages and disadvantages and the choice depends on the desired usage.

PmArray: This object contains values that are accessible by index in the array - it is possible to read any value at any time in this object. Reading and setting values is very fast, but adding is slow.

This object is functional only for JavaScript language. For the VBScript language the array is represented by Array data type.

PmList: This object contains a list of values. The values can be accessed only from the beginning or from the end of the list. Reading, adding amd removing values from beginning or end of the list is fast, but values "inside" the list cannot be accessed.

The object is designed for processing data as in "container" (stack, LIFO) or "queue" (pipe, FIFO).

PmMap: This object contains values that are addressed by name (text identifier). Value names represent object properties. The advanatege is the "clarity" of usage in the script code. The disadvantage is the inability to access the values in cycle by index.
PROMOTIC 8.3.30 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice