Da (de-allocate variables), General, C[0] - defined array name – Yaskawa LEGEND-MC User Manual
Page 98: D - defined variable name, De-allocates all the variables, 0] - de-allocates all the arrays

88
LEGEND-MC User’s Manual
DA (De-allocate Variables)
[General]
DESCRIPTION:
The DA command frees array and/or variable memory space. With this command, more than one array or
variable can be specified for memory de-allocation. Different arrays and variables are separated by comma
when specified in one command. The * argument de-allocates all variables, and *[0] de-allocates all arrays.
ARGUMENTS: DA c[0],d,etc.
where
c[0] - Defined array name
d - Defined variable name
* - De-allocates all the variables
*[0] - De-allocates all the arrays
DA? Returns the number of arrays available on the controller.
USAGE:
OPERAND USAGE:
_DA contains the total number of arrays available. For example, before any arrays have been defined, the
operand _DA is 14. If one array is defined, the operand _DA will return 13.
RELATED COMMANDS:
EXAMPLES:
‘Cars’ and ‘Salesmen’ are arrays and ‘Total’ is a variable.
NOTE: Since this command de-allocates the spaces and compacts the array spaces in the memory, it
is possible that execution of this command may take longer time than 2 ms.
While Moving
Yes
Default Value
---
In a Program
Yes
Default Format
---
Command Line
Yes
Can be Interrogated
Yes
Used as an Operand
Yes
Distributed Control
No, Local
"DM" Dimension
Array
TEMP=5
Assign 5 to the variable TEMP
DM Cars[400],Salesmen[50]
Dimension 2 arrays
Total=70
Assign 70 to the variable Total
DA Cars[0],Salesmen[0],Total
De-allocate the 2 arrays & variables
DA*[0]
De-allocate all arrays
DA *,*[0]
De-allocate all variables and all arrays
DA TEMP
De-allocate variable TEMP