Not-too-hackish pointers. Close #51.
This commit is contained in:
14
examples/pointers/main.hank
Normal file
14
examples/pointers/main.hank
Normal file
@@ -0,0 +1,14 @@
|
||||
```
|
||||
var v1 = 'Variable 1';
|
||||
var v2 = 'Variable 2';
|
||||
var v3 = 'Variable 3';
|
||||
```
|
||||
|
||||
{v1}
|
||||
{&v1}
|
||||
{v2}
|
||||
~ v2 = &v1;
|
||||
{v2}
|
||||
{*v2}
|
||||
~ *v2 = 'Value changed.';
|
||||
{v1}
|
||||
6
examples/pointers/test1.hlog
Normal file
6
examples/pointers/test1.hlog
Normal file
@@ -0,0 +1,6 @@
|
||||
Variable 1
|
||||
v1
|
||||
Variable 2
|
||||
v1
|
||||
Variable 1
|
||||
Value changed.
|
||||
Reference in New Issue
Block a user