diff options
| author | gingerBill <bill@gingerbill.org> | 2019-05-28 20:27:45 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-05-28 20:27:45 +0100 |
| commit | 3d2279fba0b322bd8d82bb43cb21f6f6f00515c5 (patch) | |
| tree | 3b318dd18172a89f4c424b5fa610347c0851aa2b /examples | |
| parent | 2b080dbbc269f2cf9bf4bcc1b67d760c9c02d93f (diff) | |
Support 128-bit integers `i128` `u128`
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/demo/demo.odin | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin index 206fa4a2d..bd4f5c8ca 100644 --- a/examples/demo/demo.odin +++ b/examples/demo/demo.odin @@ -946,7 +946,22 @@ deferred_procedure_associations :: proc() { } main :: proc() { - when true { + x: u128 = 1233456453347654617; + y: u128 = 19; + z := x * y; + w := z / 120; + + assert(z == 23435672613605437723); + // assert(w == 195297271780045314); + + + fmt.println(x); + fmt.println(y); + fmt.println(z, u128(23435672613605437723)); + fmt.println(w, u128(195297271780045314)); + fmt.println(x % 33774564533476546); + + when false { general_stuff(); union_type(); parametric_polymorphism(); |