HP Pascal/iX Reference Manual (31502-90022)

11- 32
Figure 11-6. Copying Order for move_l_to_r
Example
TYPE
Index_Type_1 = 0..20;
Index_Type_2 = -3..17;
Array_Type_1 = PACKED ARRAY [Index_Type_1] of SHORTINT;
Array_Type_2 = ARRAY [Index_Type_2] of SHORTINT;
VAR
Array_1 = Array_Type_1;
Array_2 = Array_Type_2;
Index = Integer;
BEGIN
Move_L_to_R ( 5, Array_1, 3, Array_2, -3 )
{ is equivalent to: }
FOR Index := 0 TO 4 DO
Array_2[Index-3] := Array_1[3+Index]
{ is equivalent to: }
Array_2[-3] := Array_1[3]
Array_2[-2] := Array_1[4]
Array_2[-1] := Array_1[5]
Array_2[0] := Array_1[6]
Array_2[1] := Array_1[7]
Move_R_to_L.
The predefined procedure move_r_to_l provides a generalized array copying