EasyManua.ls Logo

Galil Motion Control DMC-40x0 Series - Page 21

Default Icon
280 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
DMC-40x0 Command Reference [ ] • 11
[ ]
FUNCTION: Square Brackets (Array Index Operator)
DESCRIPTION:
The square brackets are used to denote the array index for an array, or to denote an array name.
(They are also used to designate the argument to a function, such as @ABS[n].)
ARGUMENTS: mmmmmmmm[n] where
mmmmmmmm is the array name
n is the array index and is an integer between 0 and 15999
When used in an array, n=-1 returns the array length.
USAGE: DEFAULTS:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage
ALL
RELATED COMMANDS:
DM Dimension Array
QU Print/Upload Array
EXAMPLES:
DM A[100] ;'define a 100 element array
A[0] = 3
;'set first element to 3
MG A[0]
;'print element 0
QU A[]
;'print entire array
len= A[-1]
;'variable len now contains the length of array A[]
MG len
;'Display Variable len
:100
;'Response from MG len

Related product manuals