HiLMAs reference
Back

Variable assignment and arrays

Next

MOVARRAY  TO

 

MOVARRAY array,(x[,y[,z]]),INTO,var[,D1=d1[,D2=d2]][,SLEN=l-str]
[,PLEN=l-packed][,ZLEN=l-zoned]

 

Description

The value of array variable indexed by x (and y, z, if array have 2 o 3 dimensions), is put in (if there is INTO) variable var; the type of var must be the same of array; D1 is the first dimension (a integer constant) and is mandatory if array has 2 or 3 dimensions; D2 is the second dimension if array has 3 dimensions. The last dimension of the array is never written in the instruction, but the use of the last index must be consistent with it and with the total number of elements defined in the array
If array is a string-array, SLEN is the mandatory length of every string element.
If array is an array of packed numbers, PLEN is the mandatory length of every packed element.
D1 is not mandatory if array has only one dimension.

See user's guide for more details about array definition and use.

Note that:

  • Index is an integer and starts always from 0 (the first element) and must be a positive number less than the defined array dimension
  • No control is done at run time for the index value, so be care
  • INTO can be shorted in TO

 

Parameter specifications

Parameter Name Mode Type coding Remark
1 array Input Any C,X,F,A,H,P,Z,D  
2 x [and y and z ] Input Integer F or H or const. index of array
3 TO or INTO fixed word      
4 var Output Matching C,X,F,A,H,P,Z,D  
  D1= Input Integer constant Mandatory if array dimension is 2
  D2= Input Integer constant Mandatory if array dimension is 3
  SLEN= Input Integer constant Mandatory if array type is string
  PLEN= Input Integer constant Mandatory if array type is packed num.
  ZLEN= Input Integer constant Mandatory if array type is zoned num.

 

 

MOVARRAY  FROM

MOVARRAY array,(x[,y[,z]]),FROM,var[,D1=d1[,D2=d2]][,SLEN=l-str]
[,PLEN=l-packed][,ZLEN=l-zoned]

 

Description

The value of array variable indexed by x (and y, z, if array have 2 o 3 dimensions), is filled by (if there is FROM) variable var; the type of var must be the same of array; D1 is the first dimension (a integer constant) and is mandatory if array has 2 or 3 dimensions; D2 is the second dimension if array has 3 dimensions. D1 is not mandatory if array has only one dimension.
If array is a string-array, SLEN is the mandatory length of every string element.
If array is an array of packed numbers, PLEN is the mandatory length of every packed element.
If array is an array of zoned numbers, ZLEN is the mandatory length of every zoned element.

See user's guide for more details about array definition and use.

Note that:
  • Index is an integer and starts always from 0 (the first element) and must be a positive number less than the defined array dimension
  • No control is done at run time for the index value, so be care

 

Parameter specifications

Parameter Name Mode Type coding Remark
1 array Input Any C,X,F,A,H,P,Z,D  
2 x [and y and z ] Input Integer F or H or const. index of array
3 FROM fixed word      
4 var Output Matching C,X,F,A,H,P,Z,D or const.  
  D1= Input Integer constant Mandatory if array dimension is 2
  D2= Input Integer constant Mandatory if array dimension is 3
  SLEN= Input Integer constant Mandatory if array type is string
  PLEN= Input Integer constant Mandatory if array type is packed num.
  ZLEN= Input Integer constant Mandatory if array type is zoned num.

 

Examples

 


Back Start Next
MOVE Top ADDR