FB_Array (Function Block)
Static array function block.
Extends: FB_Collection
Implements: I_Array, I_Iterable
Properties
_Begin
Type: T_Position
Index of the first element.
_End
Type: T_Position
Index of the last element.
Methods
Contains
Checks if item is contained in array.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Item to find. |
FB_exit
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
if TRUE, the exit method is called for exiting an instance that is copied afterwards (online change). |
FB_init
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
if TRUE, the retain variables are initialized (warm start / cold start) |
|
|
if TRUE, the instance afterwards gets moved into the copy code (online change) |
|
The size of the array. |
Get
Gets item from array at specified location.
Inputs
Name |
Type |
Description |
|---|---|---|
|
Location of item. |
|
|
|
Variable to store returned item. |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Get_As_String
Returns item as a string, if type to string conversion is supported.
Inputs
Name |
Type |
Description |
|---|---|---|
|
Location of item. |
|
|
|
Variable to store returned item. |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Get_Generic
Gets an item from the array in it’s generic form. Use carefully as this contains the pointer of the actual value in the collection. If you wish to use this it is recommeded you create a copy of the returned value using MEMMOVE or MEMCPY
Inputs
Name |
Type |
Description |
|---|---|---|
|
Location of item. |
Outputs
Name |
Type |
Description |
|---|---|---|
|
||
|
|
Get_Type_At
Gets the type of the item at specified location.
Inputs
Name |
Type |
Description |
|---|---|---|
|
Outputs
Name |
Type |
Description |
|---|---|---|
|
||
|
|
Reverse
Reverses the order of items in the array.
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Search
Find the location of an item in the array.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Item to find. |
Outputs
Name |
Type |
Description |
|---|---|---|
|
Location of item. |
|
|
|
Set
Changes the item at the specified location in the array.
Inputs
Name |
Type |
Description |
|---|---|---|
|
Location of item. |
|
|
|
Item to store. |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Set_Generic
Changes the item at the specified location in the array in it’s generic form.
Inputs
Name |
Type |
Description |
|---|---|---|
|
Location of item. |
|
|
Item to store. |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Swap
Swaps item at index with item at index B.
Inputs
Name |
Type |
Description |
|---|---|---|
|
Outputs
Name |
Type |
Description |
|---|---|---|
|
|