<< Click to Display Table of Contents >> Navigation: 3. Script Language > Variable Definitions and Operations > Array -Commands > Array -Commands |
MiniRobotLanguage (MRL)
ARR.Append Array
Appends a string to a specific element in a specified array.
Intention
The ARR.Append Array command is designed to append a string to an existing element in a specified array.
This is useful for concatenating strings within array elements without overwriting the existing content.
The specified element in the specified array has the string (P3) appended to its existing content.
•Element Update: The command appends the string (P3) to the existing content of the element at the specified index (P2) in the specified array (P1).
•Data Types: The value (P3) should be a string.
•No Overwrite: Unlike ARR.Set Array, this command will not overwrite the existing content but will append to it.
•Auto-Dim: if you specify an Index that is "Out of range" (higher then dimensioned), then the engine will increase the dimension of the Array automatically to that size and set the new Element to P3.
Syntax
ARR.Append Array|P1|P2[|P3]
ARR.App|P1|P2[|P3]
Parameter Explanation
•P1 - Array Number: Specifies the array number, which can range from 0 to 32.
•P2 - Array Index: Specifies the index of the element within the array to which you want to append the string.
•P3 - String to Append (Optional): Specifies the string that will be appended to the existing content of the element at the given index. If omitted, no action is taken.
Speed in Ticks:
Example
'***********************************
' ARR.-Sample for appending to an array element
'***********************************
ARR.Append Array|5|10|Appended Text
' Appends "Appended Text" to the 10th element of Array 5
Remarks
-
Limitations:
-
See also:
•SDO.Arr----Small-Introduction-To-A
•Unpack-Array-from-File_Delimiter
•Unpack-Array-from-Var_Delimiiter