diff options
| author | Ginger Bill <bill@gingerbill.org> | 2016-11-02 13:44:04 +0000 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2016-11-02 13:44:04 +0000 |
| commit | 8534e064b9b4486f3e1c819666b02933387954f5 (patch) | |
| tree | d352dbbbf3eb3b3b771a8d9e5c99df46370d68c8 /code | |
| parent | fa0eb88b7ba803dcb0670b4cff771f3584447728 (diff) | |
File restructure (again)
Diffstat (limited to 'code')
| -rw-r--r-- | code/demo.odin | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/code/demo.odin b/code/demo.odin index f6dfdefc5..991650ca0 100644 --- a/code/demo.odin +++ b/code/demo.odin @@ -4,12 +4,24 @@ Vec2 :: struct { x, y: i64 } + main :: proc() { - bar :: proc() -> i64 { - a := [3]i64{7, 4, 2} - v := Vec2{a[0], 2} - return v.x + foo :: proc() -> i64 { + bar :: proc() -> (i64, i64) { + a := [3]i64{7, 4, 2} + v := Vec2{a[0], 2} + return v.x, v.y + } + + x, y := bar() + + return x + y + } + + test :: proc(s: string) -> string { + return s } - bar() + foo() + x := test("Hello") } |