diff options
| author | gingerBill <ginger.bill.22@gmail.com> | 2016-07-21 00:26:14 +0100 |
|---|---|---|
| committer | gingerBill <ginger.bill.22@gmail.com> | 2016-07-21 00:26:14 +0100 |
| commit | cbd82e3c02cbeff8fe3ba5198d6ca730f8c1eace (patch) | |
| tree | 00728d59925609e8fd081f5276e8b26117ec00e3 /examples | |
| parent | aa6a2caecb759522914ba82cc506e60270ad1ab0 (diff) | |
Support import files as modules (i.e. import only once)
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/other.odin | 3 | ||||
| -rw-r--r-- | examples/test.odin | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/examples/other.odin b/examples/other.odin new file mode 100644 index 000000000..cdea3c675 --- /dev/null +++ b/examples/other.odin @@ -0,0 +1,3 @@ +add :: proc(a, b: int) -> int { + return a + b; +} diff --git a/examples/test.odin b/examples/test.odin new file mode 100644 index 000000000..c4c966d69 --- /dev/null +++ b/examples/test.odin @@ -0,0 +1,11 @@ +import "other" + +TAU :: 6.28; +PI :: PI/2; + +main :: proc() { + x : int = 2; + x = x * 3; + + y := add(1, x); +} |