%BEGIN

!
! TEST A MAP USE THAT IS DIFFICULT TO OPTIMISE
!
%RECORDFORMAT F(%INTEGER I,J,K,%BYTEARRAY VOL(1:5),
      %BYTE B,%BYTEARRAY LAB(1:3))
%INTEGER I,J
%RECORD(F) SP
%RECORD(F)%NAME R
      R==SP
      R=0
      R_VOL(1)='A'
      R_VOL(2)='B'
      R_VOL(3)='C'
      R_VOL(4)='D'
      R_VOL(5)='E'
      %FOR I=1,1,5 %CYCLE
         BYTEINTEGER(ADDR(R_I)+1+I)=R_VOL(I)
      %REPEAT
      I=ADDR(R_VOL(5))
      J=ADDR(R_LAB(1))
      %IF R_I=M'AB' %AND R_J=M'CDE'<<8 %AND J-I=2 %THEN %c
         PRINTSTRING("TEST OK (Unswopped)") %AND %STOP
      %if R_I=M'BA'<<16 %and R_j=M'EDC' %and J-I=2 %then %C
         PRINTSTRING("TEST OK (Swopped)") %and %stop
      WRITE(R_I,5)
      WRITE(R_J,5)
%ENDOFPROGRAM
