
%BEGIN 
%CONSTINTEGER STRLEN=3
%CONSTSTRING(STRLEN)%ARRAY CHECK(1:3)="ABC","DEF","GHI";
%INTEGER I,Fail
%STRING(STRLEN)%ARRAYFORMAT SF(1:3)
%STRINGARRAYNAME SAN
%RECORDFORMAT F(%INTEGER I,J,%STRING(3)%ARRAY S(1:3), %C
         %STRINGARRAYNAME SN)
%RECORD(F)%NAME R
%OWNBYTEINTEGERARRAY A(0:35)=0,0,0,1,0,0,0,2,
      X'03',X'41',X'42',X'43',X'03',X'44',X'45',X'46',X'03',X'47',
      X'48',X'49',0(16)
%ROUTINE CHECK VALUE(%INTEGER I,%STRING(31)S)
      %IF S#CHECK(I) %THEN PRINTSTRING("
BUG IN STRING VALUE") %AND Fail=1 %and %MONITOR
%END
%ROUTINE CHECKNAME(%INTEGER I,%STRING(*)%NAME S)
      %IF S#CHECK(I) %THEN PRINTSTRING("
BUG IN STRING NAMES") %AND Fail=1 %and %MONITOR
%END
      Fail=0
      R==RECORD(ADDR(A(0)))
      SAN==ARRAY(ADDR(A(8)),SF)
      R_SN==R_S
      CHECK VALUE(1,R_S(1))
      CHECK NAME(1,R_S(1))
      CHECK VALUE(1,R_SN(1))
      CHECK NAME(1,R_SN(1))
      CHECK VALUE(1,SAN(1))
      CHECK NAME(1,SAN(1))
      %CYCLE I=1,1,3
         CHECK VALUE(I,R_S(I))
         CHECK NAME(I,R_S(I))
         CHECK VALUE(I,R_SN(I))
         CHECK NAME(I,R_SN(I))
         CHECK VALUE(I,SAN(I))
         CHECK NAME(I,SAN(I))
      %REPEAT
      %if Fail=0 %then printstring("Test OK")
%ENDOFPROGRAM
