Programming instructions
Intermec Fingerprint v7.61 – Programmer’s Reference Manual Ed. 7  71
Chapter 2 Program Instructions
DIM
Field of Application
 Statement specifying the dimensions of an array.
Syntax DIM<<nvar>|<svar>>(<nexp
1
>[,<nexp
2
>...])...
 ...[,<<nvar>|<svar>>(<nexp
1
>[,<nexp
2
>...])]
<nvar>|<svar>  is the name of the array.
<nexp
1
>  is the max. subscript value for the fi rst dimension.
<nexp
2-10
>  are, optionally, the max.  subscript value for the following 
dimensions (No. 2-10).
Remarks
 An  array  is  created  by  entering  a  variable  followed  by  a  number  of 
subscripts (max 10) separated by commas. All the subscripts are enclosed 
by parentheses. Each subscript represents a dimension. The number of 
subscripts in an array variable, the fi rst time (regardless of line number) it 
is referred to, decides its number of dimensions. The number of elements in 
each dimension is by default restricted to four (No. 0-3).
 If more than 4 elements in any dimension is desired, a DIM statement must be 
issued. Note that 0 = 1:st element, 1 = 2:nd element, etc.
 For example ARRAY$(1,2,3) creates a three-dimensional array, where the 
dimensions each contain 4 elements (0-3) respectively. This corresponds to 
the statement DIM ARRAY$(3,3,3). 
 It  is  not  possible  to  change  the  number  of  dimensions  of  an  array  that 
already has been created during runtime. (Error 57, “Subscript out of 
range” will occur.)
 Considering the printer’s limited memory and other practical reasons, be 
careful not to make the arrays larger than necessary. A DIM statement can be 
used to limit the amount of memory set aside for the array.
Examples
 This  example  creates  an  array  containing  three  dimensions  with  13 
elements each:
  100   DIM NAME$(12,12,12)
 Here, two one-dimensional arrays are created on the same program line:
  10   DIM PRODUCT$(15), PRICE%(12)
  20   PRODUCT$(2)="PRINTER"
  30   PRICE%(2)=1995
  40    PRINT PRODUCT$(2);" $";PRICE%(2)
  RUN
  yields:
  PRINTER $1995










