-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtest.txt
More file actions
40 lines (35 loc) · 716 Bytes
/
test.txt
File metadata and controls
40 lines (35 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--!optimize 0
local function test(A, B, C)
local acc = 0
local t = {10, 20, 30, 40, 50}
local f = function(x) return x * 3, x - 1 end
for i = 1, #t do
local v = t[i]
if v % 3 == 1 then
local p, q = f(v + A)
acc = acc + p
if q < 0 then
return acc
end
elseif v % 4 == 2 then
acc = acc + (v * 2)
else
acc = acc - B
end
end
return acc - 5
end
repeat
repeat
error("bye bye bye!")
until x
warn("hi")
print("hi")
repeat
error("hello hello hello!")
until x
until x
while x do
warn("bye")
warn("can you believe this?")
end