WWW.NNC.IR
Macro Reference
461
8
Appendices
Vision System FH/FZ5 Series
User’s Manual (Z340)
Dim
Defines the array variable.
Format
Dim <arrayName>(<maxCount>[, <maxCount>[, <maxCount>[, <maxCount>]]])
Parameter
Return value
None.
Description
Defines a 1D to 4D array with maximum dimensional length specified in the <maxCount> parameter for each
dimension.
Add one of type identifiers to the end of the parameter specified in the <arrayName>. (Reference: XVariable
(p.209))
Release the array variables defined with this macro function by executing the Erase function.
If the number of array dimension is different, two arrays with the same variable name are treated as the same
variable.
An array variable and a variable with the same name are treated as different variables.
If a defined array variable is redefined, the previously defined variable is released before redefinition.
If an incorrect data type is specified for a parameter, a "Type mismatch" error will occur.
If the format is written incorrectly, such as writing the macro function name incorrectly, omitting a comma, or
omitting a half-width space, a "Syntax error" error will occur.
Usage Cautions
• None.
Example
Defines the array.
Useable Modules
Unit Calculation Macro / Scene Control Macro / Communication Command Macro / Unit Macro
Supported Versions
Version 3.50 or later
Related Items
Erase (Reference: X Details (p.512))
Parameter
name
Data type Description
<arrayName> --- Used array variable name
<maxCount> Integer type Maximum value of the subscript
Dim XY&(3)
Dim XY#(7, 15)
Dim CHARA$(31, 63, 127, 255)