|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Arrays and Data-Structures > !Collections/Fast Arrays > Collection-Commands > Smart Package Robot 's Collection Commands |
MiniRobotLanguage (MRL)
CLC.Clear Collection
Clear a specified Collection
Intention
CLC. stands for "Clear Collection". It's designed to empty a specified collection of all its elements, effectively resetting it.
Use CLC. when you need a fresh start with a collection, or to prevent carrying over data from previous operations.
You do not need to clear a Collection before first use, this is done automatically.
Syntax
CLC.[P1]
Parameter Explanation
P1 - (optional) Number of the Collection to Clear. If omitted all Collections are cleared.
Collection Type 1: "Word-Collections".
They are numbered from 0 to 1024.
Collection Type 2: "Checksum-Collections".
They are numbered from 1025 to 2048.
Example
'***********************************
' CLC.-Sample
'***********************************
' This will reset the Collection "0"
CLC.0
' Now we add the Element Heinz" to the Collection
$$NEW=Heinz
ATC.0|$$NEW
CGC.0|$$NUM
DBP.Collection 0 contains $$NUM Elements.
CGC.1|$$NUM
DBP.Collection 1 contains $$NUM Elements.
ENR.
Remarks
-
Limitations:
Currently the Smart Package Robot supports 1025 Collections that are numbered from 0 to 1024 and Type 2 -"Checksum"-Collections from 1025 to 2048.
Type 1 Collections are groups of character strings that are separated by a null byte. Therefore Elements must never Contain a CHR(0) (Null-Byte).
Type 2 Collections will contain a 16 Byte Checksum of an Element and do not have any delimiter.
See also:
• CFV. - Collection from Variable
• CTV. - Collection to Variable
• RFC. - Remove from Collection