begin comment search of string in another string: simple but not fast; string (64) sb; string (16) s; integer pos, nb, n; integer i, j; nb := 64; sb := " 123 45 ab abc 78 de"; s := "45 "; n := 3; comment real length of string s; for i := 0 until (nb - 1 - n) do begin write(i); pos := -1; for j:=0 until n do begin if s(j|1) = sb(i+j|1) then begin pos := pos + 1; writeon(pos); end end; if pos = (n-1) then begin pos := i; goto finish; end; end; finish:; write(pos); end.