Substring primes: Difference between revisions

m
→‎{{header|REXX}}: added a comment.
m (→‎{{header|REXX}}: added a count for the number of primality tests performed.)
m (→‎{{header|REXX}}: added a comment.)
Line 172:
if verify(x2, 25 , 'M')>0 then iterate /* " X2 part " " " " " */
L= length(x) /*obtain the length of the X prime.*/
ptests= ptests + 1 /*bump count of the # primality tests. */
do k=1 for L-1 /*test for primality for all substrings*/
do m=k+1 to L; y= substr(x, k, m-1) /*extract a substring from the X prime.*/