aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-11-24 23:22:16 +0000
committerGinger Bill <bill@gingerbill.org>2016-11-24 23:22:16 +0000
commitcbb70c78731b9d928508a52180a186b178d30a5e (patch)
treef1f67ab062a91b719d008795dd4b462a81e12579 /code
parent5aa0ef54c8616dc4994b6aee54c942f9c578a0b2 (diff)
Fix parsing for comments; add global ODIN_* string constants
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin43
1 files changed, 1 insertions, 42 deletions
diff --git a/code/demo.odin b/code/demo.odin
index bd3067037..a1916e589 100644
--- a/code/demo.odin
+++ b/code/demo.odin
@@ -1,46 +1,5 @@
#import "fmt.odin"
-variadic :: proc(args: ..any) {
- for i := 0; i < args.count; i++ {
- match type a : args[i] {
- case u128: fmt.println("u128", a)
- case i128: fmt.println("i128", a)
- }
- }
-
- fmt.println(..args)
-}
-
main :: proc() {
- fmt.println("Hellope, everybody!")
-
- variadic(1 as u128, 1 as i128)
-
- // x: i128 = 321312321
- // y: i128 = 123123123
- // z: i128
- // x *= x; x *= x
- // y *= y; y *= y
- // fmt.println("x =", x)
- // fmt.println("y =", y)
- // z = x + y; fmt.println("x + y", z)
- // z = x - y; fmt.println("x - y", z)
- // z = x * y; fmt.println("x * y", z)
- // z = x / y; fmt.println("x / y", z)
- // z = x % y; fmt.println("x % y", z)
- // z = x & y; fmt.println("x & y", z)
- // z = x ~ y; fmt.println("x ~ y", z)
- // z = x | y; fmt.println("x | y", z)
- // z = x &~ y; fmt.println("x &~ y", z)
-
- // z = -x
- // z = ~x
-
- // b: bool
- // b = x == y; fmt.println("x == y", b)
- // b = x != y; fmt.println("x != y", b)
- // b = x < y; fmt.println("x < y", b)
- // b = x <= y; fmt.println("x <= y", b)
- // b = x > y; fmt.println("x > y", b)
- // b = x >= y; fmt.println("x >= y", b)
+ fmt.println("Hellope, World!")
}