Module:Uniform map: Difference between revisions
m Getting there... |
m Fix error message |
||
| Line 74: | Line 74: | ||
function make_table(p, min, max) | function make_table(p, min, max) | ||
if u.index_of(primes, p) == nil then | if u.index_of(primes, p) == nil then | ||
return 'Error: ' .. p .. ' is not prime!' | |||
else | else | ||
maptable = {} -- Reset table | maptable = {} -- Reset table | ||
| Line 113: | Line 112: | ||
function p._print_table(p, min, max) | function p._print_table(p, min, max) | ||
if u.index_of(primes, u.eval_num_arg(p, 5)) == nil then | if u.index_of(primes, u.eval_num_arg(p, 5)) == nil then | ||
return 'Error: ' .. p .. ' is not prime!' | |||
end | end | ||
luatable = make_table(p, u.eval_num_arg(min, 11.5), u.eval_num_arg(max, 12.5)) | luatable = make_table(p, u.eval_num_arg(min, 11.5), u.eval_num_arg(max, 12.5)) | ||