Longest common substring: Difference between revisions

Content added Content deleted
(Longest common substring in various dialects BASIC (QBasic, Run BASIC and True BASIC))
Line 1,735: Line 1,735:
FOR k := length ( S1 ) - j DOWNTO 1 DO BEGIN
FOR k := length ( S1 ) - j DOWNTO 1 DO BEGIN


S := S1 [ ( j + 1 ) .. ( k + j + 1 ) ] ;
S := Copy(S1, (j + 1), (k + j + 1)) ;
IF ( pos ( S, S2 ) > 0 ) AND
IF ( pos ( S, S2 ) > 0 ) AND