diff options
| author | Abigail <abigail@abigail.be> | 2021-01-28 12:04:12 +0100 |
|---|---|---|
| committer | Abigail <abigail@abigail.be> | 2021-01-28 12:04:12 +0100 |
| commit | 7260520cd91bd98c143d5717f57ea0281852ac8f (patch) | |
| tree | 50a50935b5514a854cdb119ad35e6794829ce602 /challenge-003 | |
| parent | 9bbb334e1224120a789fecac7637a1cfc17c1b7d (diff) | |
| download | perlweeklychallenge-club-7260520cd91bd98c143d5717f57ea0281852ac8f.tar.gz perlweeklychallenge-club-7260520cd91bd98c143d5717f57ea0281852ac8f.tar.bz2 perlweeklychallenge-club-7260520cd91bd98c143d5717f57ea0281852ac8f.zip | |
Use 'local' for variables in lua.
Diffstat (limited to 'challenge-003')
| -rw-r--r-- | challenge-003/abigail/lua/ch-1.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/challenge-003/abigail/lua/ch-1.lua b/challenge-003/abigail/lua/ch-1.lua index 2d396d899c..70de9b1923 100644 --- a/challenge-003/abigail/lua/ch-1.lua +++ b/challenge-003/abigail/lua/ch-1.lua @@ -9,16 +9,16 @@ -- for max in io . lines () do - max = tonumber (max) - base2 = 1 + local max = tonumber (max) + local base2 = 1 -- -- Lua doesn't have a for (expr; expr; expr) syntax. -- This is missed here. -- while base2 <= max do - base3 = base2 + local base3 = base2 while base3 <= max do - base5 = base3 + local base5 = base3 while base5 <= max do print (base5) base5 = base5 * 5 |
