PURE for Mandelbrot Sets
! The caller (Explicit interface not shown)
FORALL ( i=1:n, j=1:m )
k(i,j) = mandelbrot( CMPLX((i-1)*1.0/(n-1), &
PURE INTEGER FUNCTION mandelbrot(x, itol)
INTEGER, INTENT(IN) :: itol
INTEGER k
k = 0
xtmp = -x
DO WHILE (ABS(xtmp)ɚ.0 .AND. k<itol)
xtmp = xtmp*xtmp - x
k = k + 1
END DO
mandelbrot = k