68 DM DMC-1400 Series Command Reference
DM
FUNCTION: Dimension
DESCRIPTION:
The DM command defines a single dimensional array with a name and n total elements. The
first element of the defined array starts with element number 0 and the last element is at
n-1.
ARGUMENTS: DM c[n] where
c is a name of up to eight alphanumeric characters, starting with an uppercase alphabetic
character. n is the number of entries from 1 to 1000 (1 to 2000 for the DMC-
1415/1416/1425).
DM? Returns the number of array elements available.
USAGE:
While Moving Yes Default Value ---
In a Program Yes Default Format ---
Command Line Yes
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage ALL
OPERAND USAGE:
_DM contains the available array space. For example, on a DMC-1417, before any arrays
have been defined, the operand _DM will return 1000. If an array of 100 elements is
defined, the operand _DM will return 900.
RELATED COMMANDS:
DA Deallocate Array
EXAMPLES:
DM Pets[5],Dogs[2],Cats[3] Define dimension of arrays, pets with 5 elements; Dogs with 2
elements; Cats with 3 elements
DM Tests[1000] Define dimension of array Tests with 1000 elements