PROCEDURE STRMTCH (N,M: INTEGER;VAR KEY:INTEGER; S,P:SS); VAR I,J,K:INTEGER; BEGIN I:=0; KEY:=0; WHILE I < N DO BEGIN I:=I+1; J:=I; K:=1; WHILE (S[ J ]=P[ K ]) AND (KEY=0) DO IF K=M THEN KEY:=1 ELSE BEGIN J:=J+1 ; K:=K+1 ; END END END ;