aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-04-28 11:01:46 +0100
committerGinger Bill <bill@gingerbill.org>2017-04-28 11:01:46 +0100
commit99125dc743b3f8c073fa43368b7f43c385a96a0f (patch)
tree0edd34beff3226901dbd32ec9ac66533cbb683e0 /code
parentb78e970698cc154474c3c6a8b49214f9e3d4dfe7 (diff)
Fix issue #51; begin work on `atomic` types
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin20
1 files changed, 7 insertions, 13 deletions
diff --git a/code/demo.odin b/code/demo.odin
index 323754a23..7fdb7c0a6 100644
--- a/code/demo.odin
+++ b/code/demo.odin
@@ -1,18 +1,12 @@
#import "fmt.odin";
main :: proc() {
- immutable program := "+ + * - /";
- accumulator := 0;
-
- for token in program {
- match token {
- case '+': accumulator += 1;
- case '-': accumulator -= 1;
- case '*': accumulator *= 2;
- case '/': accumulator /= 2;
- default: // Ignore everything else
- }
+ x: atomic int = 123;
+ fmt.println(x);
+ arr :[dynamic]any;
+ append(arr, "123", 123, 3.14159265359878, true);
+ for a in arr {
+ fmt.println(a);
}
-
- fmt.printf("The program \"%s\" calculates the value %d\n", program, accumulator);
+ fmt.print(arr, "\n");
}