%begin
!***********************************************************************
!*    Tests function results are not disturbed by undeclaring          *
!*     dynamic arrays                                                  *
!***********************************************************************
%integerfn itest(%integer n)
%integerarray a(1:n)
a(n)=n****2
%result=a(n)
%end
%longrealfn rtest(%integer n)
%longrealarray a(1:n)
a(n)=16/3
%result=a(n)
%end
%integer i
%longreal x
i=itest(100)
x=rtest(1000)
%if i=10000 %and x=16/3 %then printstring("TEST OK") %else %Start
      printstring("FAIL")
       printstring("
Expected =         100000"); printfl(16/3,9)
      printstring("
actual    ="); write(i,10); printfl(x,9)
%finish
%endofprogram
