|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Arrays and Data-Structures > !Collections/Fast Arrays > Fast Array-Commands > Smart Package Robot 's Collection Commands |
MiniRobotLanguage (MRL)
ASE.Array Set Element
Add Element to Array/Collection
Intention
Using the ASE./AGE. command, you can access any element in an array by its index number.
The 4'th parameter allows you to specify whether the iem should be treated as a floating-point integer or a text string, and you can automatically apply trimming, as well as convert to upper or lower case.
Please read the general information about Collections and Fast Arrays.
Syntax
ASE.P1|P2|P3[|P4]
Parameter Explanation
P1 - The collection identifier, typically a numeric value or a variable that contains a number from 0 to 1024/1025 to 2048.
P2 - The element-Index Number from 1 ... (number of Elements in Array). This Command is 1 - based command.
P3 - The element or "word" to be added to the collection. P3 can contain any characters can also be Binary.
P4 - (optional) The element can be treated as:
"f" - floating point number with a range of approximately +/- 3.4*10^-4932 to 1.2*10^4932, and offer 18 digits of precision
"i" - 64-bit Integer number with a range of -9.22x10^18 to 9.22x10^18 ( -2^63 to 2^63 -1)
"t" - Trim String before store.
"l" - Lower-Case-Trim String before store.
"u" - Upper-Case-Trim String before store.
You need to use the "f" and "i" options also when you take the Elements out of the Array / Collection if you used them to put the elements in.
You do not need to use the "t","l" and "u" option two times. You can use them either when you fill the Array or when you take things out.
Example
'***********************************
' AGE./ASE.-Sample
'***********************************
' This will reset the Collection "0"
CLC.0
' Now we add the Elements to Collecion 0, Index 1
$$LAA=Hallo Peter
ASE.0|1|$$LAA
' Now we add the Elements to Collecion 0, Index 2
$$LAB=Hallo Max
ASE.0|2|$$LAB
AGE.0|1|$$LAC
DBP.$$LAC
AGE.0|2|$$LAC
DBP.$$LAC
ENR.
Remarks
-
Limitations:
-
See also:
• CFV. - Collection from Variable
• CTV. - Collection to Variable
• RFC. - Remove from Collection