Pattern recognition routines in Fortran.