diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-01-15 19:55:04 +0000 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-01-15 19:55:04 +0000 |
| commit | ac736aa4ecf5dce7b1dbd4c5ef3758f8f2008ebc (patch) | |
| tree | b7d30f39fb13723d33de2b0a5f4029873f25a205 /code | |
| parent | 6fe25badf067d63c79999814f46be0ac79a39ef8 (diff) | |
Procedure overloading
Diffstat (limited to 'code')
| -rw-r--r-- | code/demo.odin | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/code/demo.odin b/code/demo.odin index b26adee95..7c9e206ba 100644 --- a/code/demo.odin +++ b/code/demo.odin @@ -1,9 +1,19 @@ #import "fmt.odin"; main :: proc() { - fmt.printf("%f\n", 0.0); - fmt.printf("%f\n", 1.0); - fmt.printf("%f\n", -0.5); - fmt.printf("%+f\n", 1334.67); - fmt.printf("%f\n", 789.789); + foo :: proc() { + fmt.printf("Zero args\n"); + } + foo :: proc(i: int) { + fmt.printf("One arg, i=%d\n", i); + } + THING :: 14451; + + foo(); + foo(THING); + fmt.println(THING); + + x: proc(); + x = foo; + x(); } |