I think I see what's going wrong. The conditions used in your repeat loop are causing it to end too soon, and you forgot to change test by 1 in the loop, so maybe try using this instead:
when gf clicked
delete (all v) of [numbers v]
forever
ask [What number would you like to test?] and wait
set [numtset v] to (answer)
set [reVal v] to [true]
set [test v] to (2)
if <(numtest) > (2)>
repeat until <<((test) + (1)) = (numset)> or <(reVal) = [false]>>
if <((numtest) mod (test)) = (0)>
set [reVal v] to [false]
end
change [test v] by (1)
end
if <(reVal) = [false]>
add (join (numtest) [is composite]) to [Numbers v]
else
add (join (numtest) [is prime]) to [Numbers v]
end
end
I hope that this helps!
Offline