Truncatable primes: Difference between revisions

m
→‎{{header|REXX}}: changed some comments.
m (→‎{{header|REXX}}: moved generation of primes into a subroutine, optimized the generation of primes.)
m (→‎{{header|REXX}}: changed some comments.)
Line 2,855:
/* [↓] generate more primes ≤ high.*/
do j=@.#+2 by 2 for max(0, hi%2-@.#%2-1) /*find odd primes from here on. */
parse var j '' -1 _; if _==5 then iterate /*"J divisible " "by 5? (right dig)*/
if j// 3==0 then iterate /*J" divisible by " " 3? */
if j// 7==0 then iterate /*" " " 7? */
/* [↑] the above five lines saves time*/