%BEGIN
! TESTS PASSING RECORD BY VALUE. NO OUTPUT IF OK
%RECORDFORMAT F(%INTEGER I,J,K,%RECORD(F)%NAME LINK)
%ROUTINESPEC FRED(%INTEGER I,%RECORD(F)R)
%RECORD(F) P,Q
      P_I=10; P_J=11
      Q=P
      FRED(1,Q)
      P=0; Q=0;
      FRED(2,0)
      printstring("TEST OK")
%ROUTINE FRED(%INTEGER DUMMY,%RECORD(F)R)
      %IF R_I#P_I %AND R_J#P_J %THEN %MONITOR %and %stop
      R_I=33; R_J=1
      %IF P_I#Q_I %AND P_J#Q_J %THEN %MONITOR %and %stop
%END
%ENDOFPROGRAM
