Script Statement: Resets a scriptA particular Automation Engine object type. array to its initial values.
:CLEAR Script Array
Syntax |
Description/Format |
---|---|
Script Array |
The variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. name of the script array that should be reset. |
You can use this script statement to reset a script array that has already been used to its initial values. All the existing values will be deleted in this case and the array is reset to the original statusThis represents the condition of a task (such as active, blocked, generating). that it obtained directly after its declaration (:DEFINE).
The array must be specified with the empty index brackets [].
This script element only deletes the content of the array, the variable will not be deleted. The effect is that you cannot redefine the array.
The following example defines an array and fills it with the values of a line that is part of a static Variable objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task. These values are then output in the activation reportA report provides more detailed information about a task's execution or a component.. Subsequently, the array is emptied and filled with the entry of another variable. The new values are also written to the activation report.
:DEFINE &ARRAY#, string, 5
:DEFINE &STR#, string
:FILL &ARRAY#[] = GET_VAR(VARA.STATIC.TEST,"KEY01")
:SET &STR# = ARRAY_2_STRING(&ARRAY#[])
:P "KEY01: &STR#"
:CLEAR &ARRAY#[]
:FILL &ARRAY#[] = GET_VAR(VARA.STATIC.TEST,"KEY02")
:SET &STR# = ARRAY_2_STRING(&ARRAY#[])
:P "KEY02: &STR#"
See also:
Script Elements | Description |
---|---|
Declares a script variableA placeholder for a value within a script. with a particular data type. |
Script Elements - Script Structure and Processing
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function
Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support |
Copyright © 2016 Automic Software GmbH |