diff options
author | Li Jin <dragon-fly@qq.com> | 2022-09-30 11:29:41 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-09-30 11:29:41 +0800 |
commit | 5aa41b436b3fdf29f5a0046c68cb60b16fa09eb2 (patch) | |
tree | 5c5c0ecdab0d19544652bc05b70d8131e1645337 /spec/outputs/goto.lua | |
parent | a6b6753fda9745f316f3236462b74794b35b85c9 (diff) | |
download | yuescript-5aa41b436b3fdf29f5a0046c68cb60b16fa09eb2.tar.gz yuescript-5aa41b436b3fdf29f5a0046c68cb60b16fa09eb2.tar.bz2 yuescript-5aa41b436b3fdf29f5a0046c68cb60b16fa09eb2.zip |
fix issue #81, refactor continue with gotos.
Diffstat (limited to 'spec/outputs/goto.lua')
-rw-r--r-- | spec/outputs/goto.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/outputs/goto.lua b/spec/outputs/goto.lua index d1f7b77..421508a 100644 --- a/spec/outputs/goto.lua +++ b/spec/outputs/goto.lua | |||
@@ -14,12 +14,12 @@ do | |||
14 | for x = 1, 10 do | 14 | for x = 1, 10 do |
15 | if x ^ 2 + y ^ 2 == z ^ 2 then | 15 | if x ^ 2 + y ^ 2 == z ^ 2 then |
16 | print('found a Pythagorean triple:', x, y, z) | 16 | print('found a Pythagorean triple:', x, y, z) |
17 | goto done | 17 | goto ok |
18 | end | 18 | end |
19 | end | 19 | end |
20 | end | 20 | end |
21 | end | 21 | end |
22 | ::done:: | 22 | ::ok:: |
23 | end | 23 | end |
24 | do | 24 | do |
25 | for z = 1, 10 do | 25 | for z = 1, 10 do |