Local variable examples that break everything (WIP #69)
This commit is contained in:
21
examples/divert-target-for-loop/main.hank
Normal file
21
examples/divert-target-for-loop/main.hank
Normal file
@@ -0,0 +1,21 @@
|
||||
```
|
||||
var targets = [->knot1, ->knot2, ->knot3];
|
||||
for (target in targets) {
|
||||
trace(target);
|
||||
, -> @target ->
|
||||
}
|
||||
```
|
||||
|
||||
The end.
|
||||
|
||||
== knot0
|
||||
Non-loop example.
|
||||
|
||||
== knot1
|
||||
1
|
||||
|
||||
== knot2
|
||||
2
|
||||
|
||||
== knot3
|
||||
3
|
||||
4
examples/divert-target-for-loop/test1.hlog
Normal file
4
examples/divert-target-for-loop/test1.hlog
Normal file
@@ -0,0 +1,4 @@
|
||||
1
|
||||
2
|
||||
3
|
||||
The end.
|
||||
21
examples/local-variables/main.hank
Normal file
21
examples/local-variables/main.hank
Normal file
@@ -0,0 +1,21 @@
|
||||
```
|
||||
var local = "1";
|
||||
, {local}
|
||||
|
||||
local = "2";
|
||||
var local2 = "3";
|
||||
|
||||
,,,
|
||||
{local}
|
||||
{local2}
|
||||
,,,
|
||||
|
||||
local = ->the_end;
|
||||
|
||||
, ->the_end
|
||||
|
||||
```
|
||||
|
||||
== the_end
|
||||
|
||||
The end.
|
||||
4
examples/local-variables/test1.hlog
Normal file
4
examples/local-variables/test1.hlog
Normal file
@@ -0,0 +1,4 @@
|
||||
1
|
||||
2
|
||||
3
|
||||
The end.
|
||||
Reference in New Issue
Block a user